[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 122/173: http_proxy: avoid freeing static memory
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 122/173: http_proxy: avoid freeing static memory |
Date: |
Fri, 24 Feb 2017 14:02:24 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.53.1
in repository gnurl.
commit e2e182227aa0e26baef9ead4e0b7459706e2ff28
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Feb 9 10:13:28 2017 +0100
http_proxy: avoid freeing static memory
Follow up to 7fe81ec298e0: make sure 'host' is either NULL or malloced.
---
lib/http_proxy.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/http_proxy.c b/lib/http_proxy.c
index ac1b3bf93..d523ba519 100644
--- a/lib/http_proxy.c
+++ b/lib/http_proxy.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -199,7 +199,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
free(host_port);
if(!result) {
- char *host=(char *)"";
+ char *host = NULL;
const char *proxyconn="";
const char *useragent="";
const char *http = (conn->http_proxy.proxytype == CURLPROXY_HTTP_1_0) ?
@@ -242,7 +242,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
"%s", /* Proxy-Connection */
hostheader,
http,
- host,
+ host?host:"",
conn->allocptr.proxyuserpwd?
conn->allocptr.proxyuserpwd:"",
useragent,
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 157/173: url: Improve CURLOPT_PROXY_CAPATH error handling, (continued)
- [GNUnet-SVN] [gnurl] 157/173: url: Improve CURLOPT_PROXY_CAPATH error handling, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 121/173: http_proxy: Fix tiny memory leak upon edge case connecting to proxy, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 140/173: http: fix missing 'Content-Length: 0' while negotiating auth, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 87/173: contri*.sh: cut off parentheses from names too, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 143/173: speed caps: update the timeouts if the speed is too low/high, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 91/173: VC: remove the makefile.vc6 build infra, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 156/173: cyassl: fix typo, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 86/173: RELEASE-NOTES: synced with 01ab7c30bba6f, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 102/173: mbedtls: implement CTR-DRBG and HAVEGE random generators, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 161/173: docs: gitignore curl.1, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 122/173: http_proxy: avoid freeing static memory,
gnunet <=
- [GNUnet-SVN] [gnurl] 145/173: string formatting: fix 4 printf-style format strings, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 163/173: bump: 7.53.1 coming up, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 117/173: THANKS-filter: polish some recent contributors, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 148/173: sftp: improved checks for create dir failures, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 164/173: tests: Set CHARSET & LANG to UTF-8 in 1035, 2046 and 2047, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 155/173: release: 7.53.0, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 111/173: schannel: Remove incorrect SNI disabled message, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 147/173: digest_sspi: Fix nonce-count generation in HTTP digest, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 171/173: Revert "tests: use consistent environment variables for setting charset", gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 133/173: curl: fix typo in time condition warning message, gnunet, 2017/02/24