lib/fetch/fetch.c: CID 62784 (uninitialized pointer read)

This commit is contained in:
Juan RP 2014-10-05 13:10:05 +02:00
parent 8ccb48e65b
commit 68ef66eb51

View File

@ -378,6 +378,7 @@ fetchParseURL(const char *URL)
if (*URL == '/') { if (*URL == '/') {
pre_quoted = 0; pre_quoted = 0;
strcpy(u->scheme, SCHEME_FILE); strcpy(u->scheme, SCHEME_FILE);
p = URL;
goto quote_doc; goto quote_doc;
} }
if (strncmp(URL, "file:", 5) == 0) { if (strncmp(URL, "file:", 5) == 0) {
@ -389,6 +390,7 @@ fetchParseURL(const char *URL)
goto ouch; goto ouch;
} }
URL += 2; URL += 2;
p = URL;
goto quote_doc; goto quote_doc;
} }
if (strncmp(URL, "http:", 5) == 0 || if (strncmp(URL, "http:", 5) == 0 ||