[openssl-commits] [openssl] OpenSSL_1_0_2-stable update
Rich Salz
rsalz at openssl.org
Tue May 10 17:42:11 UTC 2016
The branch OpenSSL_1_0_2-stable has been updated
via 74d6762543335641e4155fd84deaba67cd0105e4 (commit)
from 2f460e1adb4b32addb390428e8a98c7169d46bfc (commit)
- Log -----------------------------------------------------------------
commit 74d6762543335641e4155fd84deaba67cd0105e4
Author: Rich Salz <rsalz at openssl.org>
Date: Tue May 10 13:41:06 2016 -0400
GH837: Avoid double-free in OCSP parse.
Reviewed-by: Rich Salz <rsalz at openssl.org>
Reviewed-by: Dr. Stephen Henson <steve at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/ocsp/ocsp_lib.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/crypto/ocsp/ocsp_lib.c b/crypto/ocsp/ocsp_lib.c
index cabf539..ff781e5 100644
--- a/crypto/ocsp/ocsp_lib.c
+++ b/crypto/ocsp/ocsp_lib.c
@@ -271,12 +271,18 @@ int OCSP_parse_url(const char *url, char **phost, char **pport, char **ppath,
err:
if (buf)
OPENSSL_free(buf);
- if (*ppath)
+ if (*ppath) {
OPENSSL_free(*ppath);
- if (*pport)
+ *ppath = NULL;
+ }
+ if (*pport) {
OPENSSL_free(*pport);
- if (*phost)
+ *pport = NULL;
+ }
+ if (*phost) {
OPENSSL_free(*phost);
+ *phost = NULL;
+ }
return 0;
}
More information about the openssl-commits
mailing list