mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 22:47:19 +00:00
winmm: Fixed boundary condition in mmioOpen file name parsing.
This commit is contained in:
parent
e75635a738
commit
4431c32c91
|
@ -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) {
|
|
||||||
ERR("No extension in szFileName: %s\n", debugstr_a(szFileName));
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
extStart--;
|
extStart--;
|
||||||
}
|
}
|
||||||
|
if (extStart < szFileName) {
|
||||||
|
ERR("No extension in szFileName: %s\n", debugstr_a(szFileName));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (extEnd - extStart - 1 > 4)
|
if (extEnd - extStart - 1 > 4)
|
||||||
|
|
Loading…
Reference in a new issue