summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>2001-12-14 18:45:28 +0000
committerEzra Peisach <epeisach@mit.edu>2001-12-14 18:45:28 +0000
commit93d07180c1a5ab0453e9ec12a5f0c41b894fd16d (patch)
treeff7133731b91a29185db411046a72a792dc8d0f1 /src/lib
parentf7836ff4786ccd765a596c619162aa8113029555 (diff)
* hmac_md5.c (k5_hmac_md5_hash): Test if malloc returns NULL and
not the argument to malloc. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14071 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/crypto/keyhash_provider/ChangeLog5
-rw-r--r--src/lib/crypto/keyhash_provider/hmac_md5.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/crypto/keyhash_provider/ChangeLog b/src/lib/crypto/keyhash_provider/ChangeLog
index 2ded8692e..84bb79577 100644
--- a/src/lib/crypto/keyhash_provider/ChangeLog
+++ b/src/lib/crypto/keyhash_provider/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-14 Ezra Peisach <epeisach@mit.edu>
+
+ * hmac_md5.c (k5_hmac_md5_hash): Test if malloc returns NULL and
+ not the argument to malloc.
+
2001-12-05 Ezra Peisach <epeisach@mit.edu>
* t_cksum.c (main): Free memory leak in tests.
diff --git a/src/lib/crypto/keyhash_provider/hmac_md5.c b/src/lib/crypto/keyhash_provider/hmac_md5.c
index 2f406c5d4..08808ff91 100644
--- a/src/lib/crypto/keyhash_provider/hmac_md5.c
+++ b/src/lib/crypto/keyhash_provider/hmac_md5.c
@@ -58,7 +58,7 @@ k5_hmac_md5_hash (const krb5_keyblock *key, krb5_keyusage usage,
ds.length = key->length;
ks.length = key->length;
ds.data = malloc(ds.length);
- if (ds.length == NULL)
+ if (ds.data == NULL)
return ENOMEM;
ks.contents = (void *) ds.data;