summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto/md5/md5glue.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/crypto/md5/md5glue.c')
-rw-r--r--src/lib/crypto/md5/md5glue.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/crypto/md5/md5glue.c b/src/lib/crypto/md5/md5glue.c
index 84ea3e9e7..77aca3686 100644
--- a/src/lib/crypto/md5/md5glue.c
+++ b/src/lib/crypto/md5/md5glue.c
@@ -22,6 +22,9 @@ krb5_checksum FAR *outcksum;
krb5_octet *input = (krb5_octet *)in;
krb5_MD5_CTX working;
+ if (outcksum->length < RSA_MD5_CKSUM_LENGTH)
+ return KRB5_BAD_MSIZE;
+
krb5_MD5Init(&working);
krb5_MD5Update(&working, input, in_length);
krb5_MD5Final(&working);