https://bugs.winehq.org/show_bug.cgi?id=44290
Bug ID: 44290 Summary: Possible access to unintended field in "wine/dlls/winmm/mmio.c" line 788 Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winmm&mci Assignee: wine-bugs@winehq.org Reporter: petrum@gmail.com Distribution: ---
While experimenting with a CodeSonar plugin we develop, we noticed a potential bug in file "wine/dlls/winmm/mmio.c"" line 788 function mmioRead
size = MMIO_GrabNextBuffer(wm, TRUE); if (size <= 0) break; if (size > cch) size = cch; memcpy(pch, wm->info.pchBuffer, size); wm->info.pchNext += size; //HERE pch += size; cch -= size; count += size;
Shouldn't wm->info.pchBuffer be incremented at the mentioned line (instead of wm->info.pchNext)?
Thanks, Petru Florin Mihancea