PATCH: getprofile

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

 



Hi,

Trillian (www.trillian.cc) crashes in profile handling, since it passes 
a NULL pointer to a profile function, where it should not.

This patch just special cases it, a better way would be exception handlers
probably.

(It might just be wanted behaviour, but MSDN does not tell.)

Ciao, Marcus

Changelog:
	Handle section==NULL (error) in WritePrivateProfileStringA.

Index: files/profile.c
===================================================================
RCS file: /home/wine/wine/files/profile.c,v
retrieving revision 1.62
diff -u -r1.62 profile.c
--- files/profile.c	2002/01/04 18:24:37	1.62
+++ files/profile.c	2002/01/21 06:17:09
@@ -1480,8 +1557,13 @@
     {
         if (!section && !entry && !string) /* documented "file flush" case */
             PROFILE_ReleaseFile();  /* always return FALSE in this case */
-        else
-            ret = PROFILE_SetString( section, entry, string );
+	else {
+	    if (!section) {
+		FIXME("(NULL?,%s,%s,%s)? \n",entry,string,filename);
+	    } else {
+		ret = PROFILE_SetString( section, entry, string );
+	    }
+	}
     }
 
     LeaveCriticalSection( &PROFILE_CritSect );



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

  Powered by Linux