Commit 4431c32c authored by Alexander Puzankov's avatar Alexander Puzankov Committed by Alexandre Julliard

winmm: Fixed boundary condition in mmioOpen file name parsing.

parent e75635a7
......@@ -399,13 +399,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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment