dlls/setupapi/parser.c

Ge van Geldorp gvg at reactos.com
Wed Oct 6 19:06:34 CDT 2004


Changelog:
  Ge van Geldorp <gvg at reactos.com>
  - GetFullPathName returns length without nul byte

Index: dlls/setupapi/parser.c
===================================================================
RCS file: /home/wine/wine/dlls/setupapi/parser.c,v
retrieving revision 1.13
diff -u -r1.13 parser.c
--- dlls/setupapi/parser.c	22 Sep 2004 02:46:39 -0000	1.13
+++ dlls/setupapi/parser.c	6 Oct 2004 23:56:18 -0000
@@ -1064,6 +1064,7 @@
     if (strchrW( name, '\\' ) || strchrW( name, '/' ))
     {
         if (!(len = GetFullPathNameW( name, 0, NULL, NULL ))) return (HINF)INVALID_HANDLE_VALUE;
+        len++; /* Make room for terminating NUL byte */
         if (!(path = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
         {
             SetLastError( ERROR_NOT_ENOUGH_MEMORY );



More information about the wine-patches mailing list