winmm: Fixed boundary condition in mmioOpen file name parsing.

oldstable
Alexander Puzankov 2010-12-05 17:24:59 +03:00 committed by Alexandre Julliard
parent e75635a738
commit 4431c32c91
1 changed files with 5 additions and 5 deletions

View File

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