]> granicus.if.org Git - curl/commitdiff
url.c: fix SIGSEGV
authorYang Tse <yangsita@gmail.com>
Thu, 11 Jul 2013 11:29:48 +0000 (13:29 +0200)
committerYang Tse <yangsita@gmail.com>
Thu, 11 Jul 2013 11:31:08 +0000 (13:31 +0200)
lib/url.c

index 6ecf7b53b854a6228312d7f2ada63615a51cd3d4..a9760631d6fc57e1f07785eabd77f90a10f994d9 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -3858,6 +3858,8 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
   else {
     /* sanitise paths and remove ../ and ./ sequences according to RFC3986 */
     char *newp = Curl_dedotdotify(path);
+    if(!newp)
+      return CURLE_OUT_OF_MEMORY;
 
     if(strcmp(newp, path)) {
       rebuild_url = TRUE;