Ken Thomases : ntdll: Increase name buffer size in read_directory_getattrlist() for UTF-8 encoding.
Module: wine Branch: master Commit: f6926b35153888f85453856f3d3e74ac62ba3e70 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f6926b35153888f85453856f3d... Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed May 20 14:58:52 2015 -0500 ntdll: Increase name buffer size in read_directory_getattrlist() for UTF-8 encoding. The docs for getattrlist() say that ATTR_CMN_NAME can return up to NAME_MAX + 1 Unicode characters (code points) encoded in UTF-8, which means it can be up to NAME_MAX * 3 + 1 bytes. --- dlls/ntdll/directory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 455fbc6..0e5af8a 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -2144,7 +2144,7 @@ static int read_directory_getattrlist( int fd, IO_STATUS_BLOCK *io, void *buffer { u_int32_t length; struct attrreference name_reference; - char name[NAME_MAX + 1]; + char name[NAME_MAX * 3 + 1]; } attrlist_buffer; TRACE("looking up file %s\n", debugstr_us( mask ));
participants (1)
-
Alexandre Julliard