From c91ec013654e97ca1754db26bd2da62c8bbf7b47 Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Mon, 26 Jun 2017 12:05:09 -0500 Subject: [PATCH] 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) --- crypto/ocsp/ocsp_cl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.25.1