diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/f_string.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/f_string.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/lib/libcrypto/asn1/f_string.c b/src/lib/libcrypto/asn1/f_string.c index d42bcdb6ea..c213c7a88d 100644 --- a/src/lib/libcrypto/asn1/f_string.c +++ b/src/lib/libcrypto/asn1/f_string.c | |||
| @@ -150,12 +150,7 @@ a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size) | |||
| 150 | } | 150 | } |
| 151 | i /= 2; | 151 | i /= 2; |
| 152 | if (num + i > slen) { | 152 | if (num + i > slen) { |
| 153 | if (s == NULL) | 153 | sp = realloc(s, (unsigned int)num + i * 2); |
| 154 | sp = (unsigned char *)malloc( | ||
| 155 | (unsigned int)num + i * 2); | ||
| 156 | else | ||
| 157 | sp = (unsigned char *)realloc(s, | ||
| 158 | (unsigned int)num + i * 2); | ||
| 159 | if (sp == NULL) { | 154 | if (sp == NULL) { |
| 160 | ASN1err(ASN1_F_A2I_ASN1_STRING, | 155 | ASN1err(ASN1_F_A2I_ASN1_STRING, |
| 161 | ERR_R_MALLOC_FAILURE); | 156 | ERR_R_MALLOC_FAILURE); |
