https://bugs.winehq.org/show_bug.cgi?id=49285
Bug ID: 49285 Summary: PNotesPortable crashes inside kernel32 Product: Wine Version: 5.9 Hardware: x86 URL: https://download3.portableapps.com/portableapps/PNotes Portable/PNotesPortable_9.3.0.paf.exe?20190321 OS: Linux Status: NEW Keywords: download Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: xerox.xerox2000x@gmail.com Distribution: Debian
Yet another one:
Hi, a user tested some portable apps on forum: https://forum.winehq.org/viewtopic.php?f=2&t=33957
When you right-click on the taskbar icon, and then choose "Exit" it crashes.
00c4:Call KERNEL32.WritePrivateProfileStructW(00494d5c L"hotkeys",0031c6f4 L"10001",00000000,00000040,004f0310 L"Z:\media\louis\aqqa\PNotesPortable\Data\settings\Note s.ini") ret=0043456f 00c4:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7b64e9f5 ip=7b64e9f5 tid=00c4
-->crash
So looks like it crashes inside WritePrivateProfileStructW ??
sha1sum PNotesPortable_9.3.0.paf.exe 2df27f55e3b43c889a5e7c68684e8acbaef9498f PNotesPortable_9.3.0.paf.exe
https://bugs.winehq.org/show_bug.cgi?id=49285
Louis Lenders xerox.xerox2000x@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|PNotesPortable crashes |PNotesPortable crashes |inside kernel32 |inside | |WritePrivateProfileStructW
--- Comment #1 from Louis Lenders xerox.xerox2000x@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
https://bugs.winehq.org/show_bug.cgi?id=49285
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #2 from Fabian Maurer dark.shadow4@web.de --- Not 100% sure, but I think when buf is NULL, we should also set outstring NULL. This should keep the behavior correct. Are you going to send in a patch once code freeze ends?
https://bugs.winehq.org/show_bug.cgi?id=49285
--- Comment #3 from Louis Lenders xerox.xerox2000x@gmail.com --- (In reply to Fabian Maurer from comment #2) Are you going to send in a
patch once code freeze ends?
Hi Fabian, I`m not confident enough with this area of code, so i was hoping someone else more familiar with this would pick this up
Regards
https://bugs.winehq.org/show_bug.cgi?id=49285
--- Comment #4 from Fabian Maurer dark.shadow4@web.de --- Created a MR: https://gitlab.winehq.org/wine/wine/-/merge_requests/75
https://bugs.winehq.org/show_bug.cgi?id=49285
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |f391e9cf1ed597dd2d427ebef24 | |0b6c4244e2201 Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #5 from Fabian Maurer dark.shadow4@web.de --- Fixed by https://source.winehq.org/git/wine.git/?a=commit;h=f391e9cf1ed597dd2d427ebef...
https://bugs.winehq.org/show_bug.cgi?id=49285
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 7.9.
https://bugs.winehq.org/show_bug.cgi?id=49285
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |7.0.x
https://bugs.winehq.org/show_bug.cgi?id=49285
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|7.0.x |---
--- Comment #7 from Michael Stefaniuc mstefani@winehq.org --- Removing the 7.0.x milestone from bug fixes included in 7.0.2.