Fix an uninitialised read on an error path

Found by Coverity.

Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Matt Caswell 2016-08-25 09:40:17 +01:00
parent 5105ba5bec
commit cc06906707

View File

@ -257,7 +257,7 @@ static int ocsp_add1_nonce(STACK_OF(X509_EXTENSION) **exts,
*/
os.length = ASN1_object_size(0, len, V_ASN1_OCTET_STRING);
if (os.length < 0)
goto err;
return 0;
os.data = OPENSSL_malloc(os.length);
if (os.data == NULL)