From: Daniel Stenberg Date: Mon, 20 Mar 2006 13:14:01 +0000 (+0000) Subject: off-by-one for the case when it adds /? and a terminating zero to the URL X-Git-Tag: curl-7_15_4~147 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1282aad4a5122e391fccaee7de11f923b269ef45;p=thirdparty%2Fcurl.git off-by-one for the case when it adds /? and a terminating zero to the URL --- diff --git a/src/main.c b/src/main.c index 2de6676068..0e1935670d 100644 --- a/src/main.c +++ b/src/main.c @@ -3738,7 +3738,7 @@ operate(struct Configurable *config, int argc, char *argv[]) /* * Then append ? followed by the get fields to the url. */ - urlbuffer=(char *)malloc(strlen(url) + strlen(httpgetfields) + 2); + urlbuffer=(char *)malloc(strlen(url) + strlen(httpgetfields) + 3); if(!urlbuffer) { helpf("out of memory\n"); return CURLE_OUT_OF_MEMORY;