asn1/a_int.c: don't write result if returning error.
authorAndy Polyakov <appro@openssl.org>
Tue, 11 Apr 2017 22:05:26 +0000 (00:05 +0200)
committerAndy Polyakov <appro@openssl.org>
Fri, 14 Apr 2017 09:56:39 +0000 (11:56 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3192)

crypto/asn1/a_int.c

index a8fc213..fe700b2 100644 (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++) {