Commit 93c98111 authored by Fabian Maurer's avatar Fabian Maurer Committed by Alexandre Julliard

find: Prevent hang by properly checking for EOF.

parent d7533e28
......@@ -36,7 +36,7 @@ static BOOL read_char_from_handle(HANDLE handle, char *char_out)
if (buffer_pos >= buffer_max)
{
BOOL success = ReadFile(handle, buffer, 4096, &buffer_max, NULL);
if (!success)
if (!success || !buffer_max)
return FALSE;
buffer_pos = 0;
}
......
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