asn1/a_int.c: don't write result if returning error.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3192)
This commit is contained in:
Andy Polyakov 2017-04-12 00:05:26 +02:00
parent 6d4321fc24
commit b997adb3a5

View file

@ -202,7 +202,6 @@ static int asn1_get_uint64(uint64_t *pr, const unsigned char *b, size_t blen)
ASN1err(ASN1_F_ASN1_GET_UINT64, ASN1_R_TOO_LARGE);
return 0;
}
*pr = 0;
if (b == NULL)
return 0;
for (r = 0, i = 0; i < blen; i++) {