Commit f1334dbb authored by Thomas Faller's avatar Thomas Faller Committed by Alexandre Julliard

usp10: Fix invalid read.

parent 80c3fca0
......@@ -1477,7 +1477,8 @@ static HRESULT _ItemizeInternal(const WCHAR *pwcInChars, int cInChars,
}
}
while ((!levels || (levels && levels[cnt+1] == levels[0])) && (pwcInChars[cnt] == Numeric_space) && cnt < cInChars)
while ((!levels || (levels && cnt+1 < cInChars && levels[cnt+1] == levels[0]))
&& (cnt < cInChars && pwcInChars[cnt] == Numeric_space))
cnt++;
if (cnt == cInChars) /* All Spaces */
......
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