X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Frsa%2Frsa_pk1.c;h=8560755f1d12d8745f8272f2cd7441c225556677;hp=c1edd6764fc0e5d878819d91a7c525ac1fc9c302;hb=716630c0eb8546e53f1e229f2abcd867c5d46576;hpb=29c1f0615baff7e213fd664798f5d4fc89adda26 diff --git a/crypto/rsa/rsa_pk1.c b/crypto/rsa/rsa_pk1.c index c1edd6764f..8560755f1d 100644 --- a/crypto/rsa/rsa_pk1.c +++ b/crypto/rsa/rsa_pk1.c @@ -68,7 +68,7 @@ int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen, int j; unsigned char *p; - if (flen > (tlen-11)) + if (flen > (tlen-RSA_PKCS1_PADDING_SIZE)) { RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1,RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); return(0);