Commit c0e3db95 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Check for buffer overflows on data returns from RegQueryValueExA.

parent c6f0a4ed
......@@ -923,7 +923,11 @@ DWORD WINAPI RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWORD reserved, LPDWORD
}
total_size = len + info_size;
}
else if (data) memcpy( data, buf_ptr + info_size, total_size - info_size );
else if (data)
{
if (total_size - info_size > *count) status = STATUS_BUFFER_OVERFLOW;
else memcpy( data, buf_ptr + info_size, total_size - info_size );
}
}
else if (status != STATUS_BUFFER_OVERFLOW) goto done;
}
......
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