Joachim Priesner : ntdll: Fix read buffer overflow in find_file_in_dir().
Alexandre Julliard
julliard at winehq.org
Thu Oct 22 15:27:32 CDT 2020
Module: wine
Branch: master
Commit: e533a26dcff611f312e5bfce47061d2155476c42
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e533a26dcff611f312e5bfce47061d2155476c42
Author: Joachim Priesner <joachim.priesner at web.de>
Date: Thu Oct 22 18:29:49 2020 +0200
ntdll: Fix read buffer overflow in find_file_in_dir().
Signed-off-by: Joachim Priesner <joachim.priesner at web.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/unix/file.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index afb552be098..d12a3ffb119 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -2550,6 +2550,8 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i
goto not_found;
}
}
+ /* if that did not work, restore previous state of unix_name */
+ unix_name[pos - 1] = 0;
}
close( fd );
}
More information about the wine-cvs
mailing list