https://git.reactos.org/?p=reactos.git;a=commitdiff;h=940bbd2e02e1e8112e0284...
commit 940bbd2e02e1e8112e0284655c9bf06ef7d4ab7e Author: Thamatip Chitpong tangaming123456@outlook.com AuthorDate: Mon Feb 6 23:43:45 2023 +0700 Commit: Victor Perevertkin victor@perevertkin.ru CommitDate: Tue Feb 7 20:53:08 2023 +0100
[WINMM] Fixed boundary condition in mmioOpen file name parsing
Wine commit: 4431c32c91206040d59d3eb82a971245594d1243
author: Alexander Puzankov alxpnv@gmail.com Sun, 5 Dec 2010 14:24:59 +0000 (17:24 +0300)
committer: Alexandre Julliard julliard@winehq.org Sun, 5 Dec 2010 15:44:28 +0000 (16:44 +0100) --- dll/win32/winmm/mmio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dll/win32/winmm/mmio.c b/dll/win32/winmm/mmio.c index 899b990d994..a0043d6627e 100644 --- a/dll/win32/winmm/mmio.c +++ b/dll/win32/winmm/mmio.c @@ -385,13 +385,13 @@ static FOURCC MMIO_ParseExtA(LPCSTR szFileName) } else { /* Find the first '.' before '+' */ extStart = extEnd - 1; - while (*extStart != '.') { - if (extStart == szFileName) { - ERR("No extension in szFileName: %s\n", debugstr_a(szFileName)); - return ret; - } + while (extStart >= szFileName && *extStart != '.') { extStart--; } + if (extStart < szFileName) { + ERR("No extension in szFileName: %s\n", debugstr_a(szFileName)); + return ret; + } }
if (extEnd - extStart - 1 > 4)