forked from Telodendria/Telodendria
Fix invalid read in HttpParamDecode().
This commit is contained in:
parent
9358264add
commit
1d9ed5dcbf
1 changed files with 2 additions and 2 deletions
|
@ -561,7 +561,7 @@ HttpServerWorkerThread(void *args)
|
|||
}
|
||||
|
||||
requestPath[i] = '\0';
|
||||
requestParams = HttpParamDecode(requestPath + i + 1);
|
||||
requestParams = (i == requestPathLen) ? NULL : HttpParamDecode(requestPath + i + 1);
|
||||
|
||||
context = HttpServerContextCreate(requestMethod, requestPath, requestParams, fp);
|
||||
if (!context)
|
||||
|
@ -591,7 +591,7 @@ HttpServerWorkerThread(void *args)
|
|||
line[i] = tolower(line[i]);
|
||||
}
|
||||
|
||||
headerKey = Malloc((i * sizeof(char)) + 1);
|
||||
headerKey = Malloc((i + 1) * sizeof(char));
|
||||
if (!headerKey)
|
||||
{
|
||||
goto internal_error;
|
||||
|
|
Loading…
Reference in a new issue