diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/f_int.c')
-rw-r--r-- | src/lib/libcrypto/asn1/f_int.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/lib/libcrypto/asn1/f_int.c b/src/lib/libcrypto/asn1/f_int.c index f355dbacbe..3f671d1c49 100644 --- a/src/lib/libcrypto/asn1/f_int.c +++ b/src/lib/libcrypto/asn1/f_int.c | |||
@@ -158,12 +158,7 @@ a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size) | |||
158 | } | 158 | } |
159 | i /= 2; | 159 | i /= 2; |
160 | if (num + i > slen) { | 160 | if (num + i > slen) { |
161 | if (s == NULL) | 161 | sp = OPENSSL_realloc_clean(s, slen, num + i * 2); |
162 | sp = (unsigned char *)malloc( | ||
163 | (unsigned int)num + i * 2); | ||
164 | else | ||
165 | sp = OPENSSL_realloc_clean(s, slen, | ||
166 | num + i * 2); | ||
167 | if (sp == NULL) { | 162 | if (sp == NULL) { |
168 | ASN1err(ASN1_F_A2I_ASN1_INTEGER, | 163 | ASN1err(ASN1_F_A2I_ASN1_INTEGER, |
169 | ERR_R_MALLOC_FAILURE); | 164 | ERR_R_MALLOC_FAILURE); |