diff options
Diffstat (limited to 'security/rsaref/patches/patch-ah')
-rw-r--r-- | security/rsaref/patches/patch-ah | 46 |
1 files changed, 41 insertions, 5 deletions
diff --git a/security/rsaref/patches/patch-ah b/security/rsaref/patches/patch-ah index 24bb20d57e3..4b074942627 100644 --- a/security/rsaref/patches/patch-ah +++ b/security/rsaref/patches/patch-ah @@ -1,7 +1,7 @@ -$NetBSD: patch-ah,v 1.1 1999/05/23 21:12:01 tv Exp $ +$NetBSD: patch-ah,v 1.2 1999/12/02 17:20:14 sommerfeld Exp $ ---- ../source/rsa.c.orig Sun May 23 16:57:34 1999 -+++ ../source/rsa.c Sun May 23 16:57:58 1999 +--- ../source/rsa.c.orig Fri Mar 25 14:01:48 1994 ++++ ../source/rsa.c Thu Dec 2 11:39:43 1999 @@ -11,10 +11,10 @@ #include "rsa.h" #include "nn.h" @@ -15,7 +15,43 @@ $NetBSD: patch-ah,v 1.1 1999/05/23 21:12:01 tv Exp $ ((unsigned char *, unsigned int *, unsigned char *, unsigned int, R_RSA_PRIVATE_KEY *)); -@@ -212,7 +212,7 @@ +@@ -33,6 +33,8 @@ + unsigned char byte, pkcsBlock[MAX_RSA_MODULUS_LEN]; + unsigned int i, modulusLen; + ++ if (inputLen+3>MAX_RSA_MODULUS_LEN) return (RE_LEN); ++ + modulusLen = (publicKey->bits + 7) / 8; + if (inputLen + 11 > modulusLen) + return (RE_LEN); +@@ -78,6 +80,8 @@ + unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN]; + unsigned int i, modulusLen, pkcsBlockLen; + ++ if (inputLen>MAX_RSA_MODULUS_LEN) return (RE_LEN); ++ + modulusLen = (publicKey->bits + 7) / 8; + if (inputLen > modulusLen) + return (RE_LEN); +@@ -129,6 +133,8 @@ + unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN]; + unsigned int i, modulusLen; + ++ if (inputLen+3>MAX_RSA_MODULUS_LEN) return (RE_LEN); ++ + modulusLen = (privateKey->bits + 7) / 8; + if (inputLen + 11 > modulusLen) + return (RE_LEN); +@@ -168,6 +174,8 @@ + unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN]; + unsigned int i, modulusLen, pkcsBlockLen; + ++ if (inputLen>MAX_RSA_MODULUS_LEN) return (RE_LEN); ++ + modulusLen = (privateKey->bits + 7) / 8; + if (inputLen > modulusLen) + return (RE_LEN); +@@ -212,7 +220,7 @@ Assumes inputLen < length of modulus. Requires input < modulus. */ @@ -24,7 +60,7 @@ $NetBSD: patch-ah,v 1.1 1999/05/23 21:12:01 tv Exp $ unsigned char *output; /* output block */ unsigned int *outputLen; /* length of output block */ unsigned char *input; /* input block */ -@@ -252,7 +252,7 @@ +@@ -252,7 +260,7 @@ Assumes inputLen < length of modulus. Requires input < modulus. */ |