From abcea311e3b3178e8848e4da5acdf50afd89e4ce Mon Sep 17 00:00:00 2001 From: douglas steinwand Date: Mon, 22 Mar 2010 09:25:03 +0100 Subject: Fix insufficient initialization in Curl_clone_ssl_config() which could have caused a double free when reusing curl handle. --- lib/sslgen.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib') diff --git a/lib/sslgen.c b/lib/sslgen.c index 6707e0af6..4e88bba86 100644 --- a/lib/sslgen.c +++ b/lib/sslgen.c @@ -105,30 +105,40 @@ Curl_clone_ssl_config(struct ssl_config_data *source, if(!dest->CAfile) return FALSE; } + else + dest->CAfile = NULL; if(source->CApath) { dest->CApath = strdup(source->CApath); if(!dest->CApath) return FALSE; } + else + dest->CApath = NULL; if(source->cipher_list) { dest->cipher_list = strdup(source->cipher_list); if(!dest->cipher_list) return FALSE; } + else + dest->cipher_list = NULL; if(source->egdsocket) { dest->egdsocket = strdup(source->egdsocket); if(!dest->egdsocket) return FALSE; } + else + dest->egdsocket = NULL; if(source->random_file) { dest->random_file = strdup(source->random_file); if(!dest->random_file) return FALSE; } + else + dest->random_file = NULL; return TRUE; } -- cgit v1.2.3