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 a8fc213a738830e5efd673de7c3fbbab684b632c..fe700b22f7ed0f10d040b1dc326c0384e11c7399 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++) {