Fabian Maurer : find: Prevent hang by properly checking for EOF.
Alexandre Julliard
julliard at winehq.org
Fri Nov 1 15:37:48 CDT 2019
Module: wine
Branch: master
Commit: 93c98111aee7d96a1150657d9220d32f2f06e745
URL: https://source.winehq.org/git/wine.git/?a=commit;h=93c98111aee7d96a1150657d9220d32f2f06e745
Author: Fabian Maurer <dark.shadow4 at web.de>
Date: Fri Nov 1 16:02:41 2019 +0100
find: Prevent hang by properly checking for EOF.
Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/find/find.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/programs/find/find.c b/programs/find/find.c
index 3794a8190f..34ca2801eb 100644
--- a/programs/find/find.c
+++ b/programs/find/find.c
@@ -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;
}
More information about the wine-cvs
mailing list