From: Benjamin Kaduk Date: Mon, 26 Jun 2017 17:05:09 +0000 (-0500) Subject: Fix return-value checks in OCSP_resp_get1_id() X-Git-Tag: OpenSSL_1_1_1-pre1~1196 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=c91ec013654e97ca1754db26bd2da62c8bbf7b47 Fix return-value checks in OCSP_resp_get1_id() Commit db17e43d882ecde217e1dce4a2b8c76c3ed134bf added the function but would improperly report success if the underlying dup operation failed. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/3775) --- diff --git a/crypto/ocsp/ocsp_cl.c b/crypto/ocsp/ocsp_cl.c index 118b66a2f5..f6101e1532 100644 --- a/crypto/ocsp/ocsp_cl.c +++ b/crypto/ocsp/ocsp_cl.c @@ -230,7 +230,7 @@ int OCSP_resp_get1_id(const OCSP_BASICRESP *bs, } else { return 0; } - if (pname == NULL && pid == NULL) + if (*pname == NULL && *pid == NULL) return 0; return 1; }