[PATCH 1/3] curl: Don't free memory for subjectAltName before calling callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Freeing memory for subjectAltName in parse_cert, will give cert_cb 
pointers to freed memory zone that may already been overwritten.
Memory for subjectAltName is released in parse_cert_free

Signed-off-by: Cedric Izoard <cedric.izoard@xxxxxxxxxxxx>
---
 src/utils/http_curl.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/utils/http_curl.c b/src/utils/http_curl.c
index d594398..eb41a96 100644
--- a/src/utils/http_curl.c
+++ b/src/utils/http_curl.c
@@ -859,7 +859,6 @@ static void parse_cert(struct http_ctx *ctx, struct http_cert *hcert,
 	*names = X509_get_ext_d2i(cert, NID_subject_alt_name, NULL, NULL);
 	if (*names) {
 		add_alt_names(ctx, hcert, *names);
-		sk_GENERAL_NAME_pop_free(*names, GENERAL_NAME_free);
 	}
 
 	add_logotype_ext(ctx, hcert, cert);
-- 
2.7.4

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux