upnphttp: Kill strange HTTP request parsing
Avoid reading uninitialized memory on malicious HTTP requests. Fixes: Bug #293 - upnphttp.c ProcessHttpQuery_upnphttp() Function HTTP Request Handling Remote DoS
This commit is contained in:
parent
da91cb8de2
commit
8a996b4b62
@ -827,12 +827,6 @@ ProcessHttpQuery_upnphttp(struct upnphttp * h)
|
|||||||
HttpCommand[i] = '\0';
|
HttpCommand[i] = '\0';
|
||||||
while(*p==' ')
|
while(*p==' ')
|
||||||
p++;
|
p++;
|
||||||
if(strncmp(p, "http://", 7) == 0)
|
|
||||||
{
|
|
||||||
p = p+7;
|
|
||||||
while(*p!='/')
|
|
||||||
p++;
|
|
||||||
}
|
|
||||||
for(i = 0; i<511 && *p && *p != ' ' && *p != '\r'; i++)
|
for(i = 0; i<511 && *p && *p != ' ' && *p != '\r'; i++)
|
||||||
HttpUrl[i] = *(p++);
|
HttpUrl[i] = *(p++);
|
||||||
HttpUrl[i] = '\0';
|
HttpUrl[i] = '\0';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user