Check for null ptr return from RegEnumValue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This was crashing IE setup. Dunno where the regression came from, but I
think null returns like this are legal, so we should check for it.

ChangeLog:
Check for null ptr return from RegEnumValue in freetype font enumeration

Index: dlls/gdi/freetype.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/freetype.c,v
retrieving revision 1.49
diff -u -r1.49 freetype.c
--- dlls/gdi/freetype.c 5 Jan 2004 23:42:09 -0000       1.49
+++ dlls/gdi/freetype.c 6 Jan 2004 20:25:50 -0000
@@ -845,7 +845,8 @@
        vlen = valuelen;
        while(RegEnumValueW(hkey, i++, valueW, &vlen, NULL, &type, data,
                            &dlen) == ERROR_SUCCESS) {
-           if(((LPWSTR)data)[0] && ((LPWSTR)data)[1] == ':')
+
+           if ((data && ((LPWSTR)data)[0]) && ((LPWSTR)data)[1] == ':')
                if(wine_get_unix_file_name((LPWSTR)data, unixname, sizeof(unixname)))
                    AddFontFileToList(unixname, NULL);
  




[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux