Fix an obvious typo leading to a crash

Dmitry Timoshkov dmitry at baikal.ru
Wed Aug 25 07:01:50 CDT 2004


Hello,

this patch fixes an obvious typo 'if (!s) p += strlen(s) + 1' which
leads to a crash due to dereferencing NULL pointer.

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    Fix an obvious typo leading to a crash.

--- cvs/hq/wine/dlls/winmm/mci.c	2004-07-06 11:26:42.000000000 +0900
+++ wine/dlls/winmm/mci.c	2004-08-25 20:41:32.000000000 +0900
@@ -1514,7 +1514,8 @@ static	DWORD MCI_SysInfo(UINT uDevID, DW
 	    }
 	    if (!s) {
 		if (GetPrivateProfileStringA("mci", 0, "", buf, sizeof(buf), "system.ini")) {
-		    for(p = buf; *p; p += strlen(s) + 1, cnt++) {
+		    for(p = buf; *p; p += strlen(p) + 1, cnt++) {
+                        TRACE("%ld: %s\n", cnt, p);
 			if (cnt == lpParms->dwNumber - 1) {
 			    s = p;
 			    break;






More information about the wine-patches mailing list