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) ...@@ -399,13 +399,13 @@ static FOURCC MMIO_ParseExtA(LPCSTR szFileName)
} else { } else {
/* Find the first '.' before '+' */ /* Find the first '.' before '+' */
extStart = extEnd - 1; extStart = extEnd - 1;
while (*extStart != '.') { while (extStart >= szFileName && *extStart != '.') {
if (extStart == szFileName) { extStart--;
}
if (extStart < szFileName) {
ERR("No extension in szFileName: %s\n", debugstr_a(szFileName)); ERR("No extension in szFileName: %s\n", debugstr_a(szFileName));
return ret; return ret;
} }
extStart--;
}
} }
if (extEnd - extStart - 1 > 4) 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