http.sys: Allocate enough memory including the NULL. (Coverity).

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Alistair Leslie-Hughes 2019-09-06 02:16:33 +00:00 committed by Alexandre Julliard
parent 5c17a0b07c
commit 446bc4689f
1 changed files with 1 additions and 1 deletions

View File

@ -1064,7 +1064,7 @@ static NTSTATUS http_add_url(struct request_queue *queue, IRP *irp)
if (!(addr.sin_port = htons(strtol(strchr(params->url + 7, ':') + 1, &endptr, 10))) || *endptr != '/')
return STATUS_INVALID_PARAMETER;
if (!(url = heap_alloc(strlen(params->url))))
if (!(url = heap_alloc(strlen(params->url)+1)))
return STATUS_NO_MEMORY;
strcpy(url, params->url);