summaryrefslogtreecommitdiff
path: root/security/mit-krb5/patches/patch-bw
diff options
context:
space:
mode:
Diffstat (limited to 'security/mit-krb5/patches/patch-bw')
-rw-r--r--security/mit-krb5/patches/patch-bw16
1 files changed, 16 insertions, 0 deletions
diff --git a/security/mit-krb5/patches/patch-bw b/security/mit-krb5/patches/patch-bw
new file mode 100644
index 00000000000..f4e8c70b63c
--- /dev/null
+++ b/security/mit-krb5/patches/patch-bw
@@ -0,0 +1,16 @@
+$NetBSD: patch-bw,v 1.1 2010/02/24 19:07:51 tez Exp $
+
+--- lib/crypto/old/old_decrypt.c.orig 2003-07-22 14:09:31.000000000 -0500
++++ lib/crypto/old/old_decrypt.c 2010-02-23 17:43:53.702276900 -0600
+@@ -45,8 +45,10 @@
+ blocksize = enc->block_size;
+ hashsize = hash->hashsize;
+
++ /* Verify input and output lengths. */
++ if (input->length < blocksize + hashsize || input->length % blocksize != 0)
++ return(KRB5_BAD_MSIZE);
+ plainsize = input->length - blocksize - hashsize;
+-
+ if (arg_output->length < plainsize)
+ return(KRB5_BAD_MSIZE);
+