Module: wine Branch: master Commit: 4431c32c91206040d59d3eb82a971245594d1243 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4431c32c91206040d59d3eb82a...
Author: Alexander Puzankov alxpnv@gmail.com Date: Sun Dec 5 17:24:59 2010 +0300
winmm: Fixed boundary condition in mmioOpen file name parsing.
---
dlls/winmm/mmio.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/winmm/mmio.c b/dlls/winmm/mmio.c index 2e414ba..6ac295e 100644 --- a/dlls/winmm/mmio.c +++ b/dlls/winmm/mmio.c @@ -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)