Commit e533a26d authored by Joachim Priesner's avatar Joachim Priesner Committed by Alexandre Julliard

ntdll: Fix read buffer overflow in find_file_in_dir().

parent 36dcb696
...@@ -2550,6 +2550,8 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i ...@@ -2550,6 +2550,8 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i
goto not_found; goto not_found;
} }
} }
/* if that did not work, restore previous state of unix_name */
unix_name[pos - 1] = 0;
} }
close( fd ); close( fd );
} }
......
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