Alistair Leslie-Hughes : http.sys: Allocate enough memory including the NULL. (Coverity).
Module: wine Branch: master Commit: 446bc4689f7bf37c6085c8102e2606cc631cecef URL: https://source.winehq.org/git/wine.git/?a=commit;h=446bc4689f7bf37c6085c8102... Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Fri Sep 6 02:16:33 2019 +0000 http.sys: Allocate enough memory including the NULL. (Coverity). Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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 b2400a2..b5d5a21 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);
participants (1)
-
Alexandre Julliard