SHGetSpecialFolderPathA & valgrind

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

 



In SHGetSpecialFolderPathA we either grab szPath from the registry (using RegCreateKeyExA) or use a default value. Then we get back to the common code and check dwType to see if we should expand szPath. But if RegCreateKeyExA failed, i.e. if we used the default values, then dwType is not set.

Changelog:

* dlls/shell32/shellpath.c

Francois Gouget <fgouget@xxxxxxxxxxxxxxx>
If using the default values, also set dwType to REG_SZ as our default strings don't need to be expanded (found by Valgrind).


--
Francois Gouget
fgouget@xxxxxxxxxxxxxxx

Index: dlls/shell32/shellpath.c
===================================================================
RCS file: /home/cvs/wine/dlls/shell32/shellpath.c,v
retrieving revision 1.74
diff -u -r1.74 shellpath.c
--- dlls/shell32/shellpath.c	16 Oct 2003 19:12:49 -0000	1.74
+++ dlls/shell32/shellpath.c	19 Nov 2003 21:31:49 -0000
@@ -1089,6 +1089,7 @@
 	        strcpy(szPath, "C:\\");	/* FIXME ??? */
 	        strcat(szPath, szDefaultPath);
 	      }
+              dwType=REG_SZ;
 	      RegSetValueExA(hKey,szValueName,0,REG_SZ,(LPBYTE)szPath,strlen(szPath)+1);
 	    }
 	  }
@@ -1125,6 +1126,7 @@
 	      strcpy(szPath, "C:\\");	/* FIXME ??? */
 	      strcat(szPath, szDefaultPath);
 	    }
+            dwType=REG_SZ;
 	    RegSetValueExA(hKey,szValueName,0,REG_SZ,(LPBYTE)szPath,strlen(szPath)+1);
 	  }
 	  RegCloseKey(hKey);

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

  Powered by Linux