summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2007-12-01 22:03:03 +0000
committerArthur de Jong <arthur@arthurdejong.org>2007-12-01 22:03:03 +0000
commit1c2e0d29fa1a22a88e0a48717c8d02c138d5a434 (patch)
treed86fac2da5b9e87160fc7e39b8743b594c0578b6 /common
parent02acd0ec98167b72634677c66890886c72e655f0 (diff)
simple check for validity of key value in dict_put()
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@482 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'common')
-rw-r--r--common/dict.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/dict.c b/common/dict.c
index 3aebde7..b6e54cf 100644
--- a/common/dict.c
+++ b/common/dict.c
@@ -91,6 +91,8 @@ DICT *dict_new(void)
int dict_put(DICT *dict,const char *key,void *value)
{
struct dict_entry *entry;
+ if (key==NULL)
+ return -1;
entry=dict_entry_find(dict,key);
if ((entry==NULL)&&(value==NULL))
{