[PATCH] http.sys: Allocate enough memory including the NULL. (Coverity)
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Thu Sep 5 21:16:33 CDT 2019
CID 1453492
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
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 b2400a26b7..b5d5a219dc 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);
--
2.17.1
More information about the wine-devel
mailing list