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>
This commit is contained in:
parent
5c17a0b07c
commit
446bc4689f
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue