bagder: curl-www libcurl-urllen.patch,1.1,1.2

[email protected]
Newsgroups gmane.comp.web.curl.www.cvs
Message-ID <[email protected]>
Update of /cvsroot/curl/curl-www
In directory labb:/tmp/cvs-serv12833

Modified Files:
	libcurl-urllen.patch 
Log Message:
use +3 instead to work more generically even for older libcurl versions


Index: libcurl-urllen.patch
===================================================================
RCS file: /cvsroot/curl/curl-www/libcurl-urllen.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- libcurl-urllen.patch	7 Dec 2005 10:49:10 -0000	1.1
+++ libcurl-urllen.patch	12 Dec 2005 23:18:05 -0000	1.2
@@ -11,18 +11,18 @@
  
 -  conn->pathbuffer=(char *)malloc(urllen);
 +  /*
-+   * We malloc() the buffers below urllen+2 to make room for to possibilities:
++   * We malloc() the buffers below urllen+3 to make room for to possibilities:
 +   * 1 - an extra terminating zero
-+   * 2 - an extra slash (in case a syntax like "www.host.com?moo" is used)
++   * 2 - (possibly an extra slash and) a terminating zero
 +   */
 +
-+  conn->pathbuffer=(char *)malloc(urllen+2);
++  conn->pathbuffer=(char *)malloc(urllen+3);
    if(NULL == conn->pathbuffer)
      return CURLE_OUT_OF_MEMORY; /* really bad error */
    conn->path = conn->pathbuffer;
  
 -  conn->host.rawalloc=(char *)malloc(urllen);
-+  conn->host.rawalloc=(char *)malloc(urllen+2);
++  conn->host.rawalloc=(char *)malloc(urllen+3);
    if(NULL == conn->host.rawalloc)
      return CURLE_OUT_OF_MEMORY;
    conn->host.name = conn->host.rawalloc;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.