Module: wine Branch: master Commit: d1d37e40d2cd2e7eb181db733ac8a2141cae4d99 URL: https://gitlab.winehq.org/wine/wine/-/commit/d1d37e40d2cd2e7eb181db733ac8a21...
Author: Zebediah Figura zfigura@codeweavers.com Date: Tue Dec 20 00:57:18 2022 -0600
httpapi: Allow passing NULL size to HttpReceiveHttpRequest().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53980
---
dlls/httpapi/httpapi_main.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/httpapi/httpapi_main.c b/dlls/httpapi/httpapi_main.c index 964589021d6..cd00608c1ca 100644 --- a/dlls/httpapi/httpapi_main.c +++ b/dlls/httpapi/httpapi_main.c @@ -323,6 +323,7 @@ ULONG WINAPI HttpReceiveHttpRequest(HANDLE queue, HTTP_REQUEST_ID id, ULONG flag .bits = sizeof(void *) * 8, }; ULONG ret = ERROR_SUCCESS; + ULONG local_ret_size; OVERLAPPED sync_ovl;
TRACE("queue %p, id %s, flags %#lx, request %p, size %#lx, ret_size %p, ovl %p.\n", @@ -340,6 +341,9 @@ ULONG WINAPI HttpReceiveHttpRequest(HANDLE queue, HTTP_REQUEST_ID id, ULONG flag ovl = &sync_ovl; }
+ if (!ret_size) + ret_size = &local_ret_size; + if (!DeviceIoControl(queue, IOCTL_HTTP_RECEIVE_REQUEST, ¶ms, sizeof(params), request, size, ret_size, ovl)) ret = GetLastError();