[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)
This commit is contained in:
Thamatip Chitpong 2023-02-06 23:43:45 +07:00 committed by Victor Perevertkin
parent d27e2b0b23
commit 940bbd2e02

View file

@ -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)