[PATCH 0/1] MR10061: winhttp: Use the wcsdup function in set_cookies.
I missed this one in commit ebe6e7473056deb1fda9de6d700e13c52ccffce0. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10061
From: Alex Henrie <alexhenrie24@gmail.com> I missed this one in commit ebe6e7473056deb1fda9de6d700e13c52ccffce0. --- dlls/winhttp/cookie.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/winhttp/cookie.c b/dlls/winhttp/cookie.c index e1f75639ff8..777df3c8676 100644 --- a/dlls/winhttp/cookie.c +++ b/dlls/winhttp/cookie.c @@ -270,9 +270,7 @@ BOOL set_cookies( struct request *request, const WCHAR *cookies ) struct cookie *cookie; int len, used; - len = lstrlenW( cookies ); - if (!(buffer = malloc( (len + 1) * sizeof(WCHAR) ))) return FALSE; - lstrcpyW( buffer, cookies ); + if (!(buffer = wcsdup( cookies ))) return FALSE; p = buffer; while (*p && *p != ';') p++; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10061
This merge request was approved by Hans Leidekker. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10061
participants (3)
-
Alex Henrie -
Alex Henrie (@alexhenrie) -
Hans Leidekker (@hans)