[PATCH] winhttp/tests: Avoid an invalid write in asynchronous mode (Valgrind).
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> --- dlls/winhttp/tests/notification.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/winhttp/tests/notification.c b/dlls/winhttp/tests/notification.c index 086f2e7935..510d9e7a3e 100644 --- a/dlls/winhttp/tests/notification.c +++ b/dlls/winhttp/tests/notification.c @@ -920,7 +920,7 @@ static const struct notification read_allow_close_test[] = static void _read_request_data(struct test_request *req, struct info *info, const char *expected_data, BOOL closing_connection, unsigned line) { char buffer[1024]; - DWORD read, len; + DWORD len; BOOL ret; if (closing_connection) @@ -937,8 +937,7 @@ static void _read_request_data(struct test_request *req, struct info *info, cons setup_test( info, winhttp_read_data, line ); memset(buffer, '?', sizeof(buffer)); - read = 0xdeadbeef; - ret = WinHttpReadData( req->request, buffer, sizeof(buffer), &read ); + ret = WinHttpReadData( req->request, buffer, sizeof(buffer), NULL ); ok(ret, "failed to read data %u\n", GetLastError()); WaitForSingleObject( info->wait, INFINITE ); -- 2.11.0
participants (1)
-
Hans Leidekker