From 446bc4689f7bf37c6085c8102e2606cc631cecef Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 6 Sep 2019 02:16:33 +0000 Subject: [PATCH] http.sys: Allocate enough memory including the NULL. (Coverity). Signed-off-by: Alistair Leslie-Hughes Signed-off-by: Alexandre Julliard --- dlls/http.sys/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/http.sys/http.c b/dlls/http.sys/http.c index b2400a26b7c..b5d5a219dca 100644 --- a/dlls/http.sys/http.c +++ b/dlls/http.sys/http.c @@ -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);