[Bug 49285] PNotesPortable crashes inside WritePrivateProfileStructW
WineHQ Bugzilla
wine-bugs at winehq.org
Wed Jan 12 14:32:57 CST 2022
https://bugs.winehq.org/show_bug.cgi?id=49285
Louis Lenders <xerox.xerox2000x at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|PNotesPortable crashes |PNotesPortable crashes
|inside kernel32 |inside
| |WritePrivateProfileStructW
--- Comment #1 from Louis Lenders <xerox.xerox2000x at gmail.com> ---
revisit old bug by me. Still present,
0108:Call KERNEL32.WritePrivateProfileStructW(00494d5c L"hotkeys",0032c694
L"10001",00000000,00000040,004f0310
L"Z:\\home\\louis\\d\\PNotesPortable\\Data\\settings\\Notes.ini") ret=0043456f
buf pointer is NULL, so crashes in following code (profile.c):
if (!section && !key && !buf) /* flush the cache */
return WritePrivateProfileStringW( NULL, NULL, NULL, filename );
/* allocate string buffer for hex chars + checksum hex char + '\0' */
outstring = HeapAlloc( GetProcessHeap(), 0, (bufsize*2 + 2 + 1) *
sizeof(WCHAR) );
p = outstring;
for (binbuf = (LPBYTE)buf; binbuf < (LPBYTE)buf+bufsize; binbuf++) {
*p++ = hex[*binbuf >> 4];
*p++ = hex[*binbuf & 0xf];
Hacking "!key && !buf" into !key || !buf" gets rid of the crash
Adjusting title
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list