Commit 75b41873 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

winhttp: Use an unsigned integer for number values in query_headers().

parent 860a6d76
......@@ -734,15 +734,15 @@ static DWORD query_headers( struct request *request, DWORD level, const WCHAR *n
if (!header || (request_only && !header->is_request)) return ERROR_WINHTTP_HEADER_NOT_FOUND;
if (level & WINHTTP_QUERY_FLAG_NUMBER)
{
if (!buffer || sizeof(int) > *buflen) ret = ERROR_INSUFFICIENT_BUFFER;
if (!buffer || sizeof(DWORD) > *buflen) ret = ERROR_INSUFFICIENT_BUFFER;
else
{
int *number = buffer;
*number = wcstol( header->value, NULL, 10 );
TRACE("returning number: %d\n", *number);
DWORD *number = buffer;
*number = wcstoul( header->value, NULL, 10 );
TRACE("returning number: %lu\n", *number);
ret = ERROR_SUCCESS;
}
*buflen = sizeof(int);
*buflen = sizeof(DWORD);
}
else if (level & WINHTTP_QUERY_FLAG_SYSTEMTIME)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment