Fix return-value checks in OCSP_resp_get1_id()
authorBenjamin Kaduk <bkaduk@akamai.com>
Mon, 26 Jun 2017 17:05:09 +0000 (12:05 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Tue, 27 Jun 2017 15:49:53 +0000 (10:49 -0500)
Commit db17e43d882ecde217e1dce4a2b8c76c3ed134bf added the function
but would improperly report success if the underlying dup operation
failed.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3775)

crypto/ocsp/ocsp_cl.c

index 118b66a2f5015fb2fe27ac0483d0b6c00127a106..f6101e1532e4e9ae2645cce3ace6a079a1c4dd5e 100644 (file)
@@ -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;
 }