find: Prevent hang by properly checking for EOF.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d7533e28df
commit
93c98111ae
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue