Commit 3f9c9eaa authored by Thomas Faber's avatar Thomas Faber Committed by Alexandre Julliard

usp10: Do not write to last script item if buffer space is insufficient.

parent dfa98dfb
......@@ -1616,12 +1616,12 @@ static HRESULT _ItemizeInternal(const WCHAR *pwcInChars, int cInChars,
* item is set up to prevent random behaviour if the caller erroneously
* checks the n+1 structure */
index++;
if (index + 1 > cMaxItems) return E_OUTOFMEMORY;
memset(&pItems[index].a, 0, sizeof(SCRIPT_ANALYSIS));
TRACE("index=%d cnt=%d iCharPos=%d\n", index, cnt, pItems[index].iCharPos);
/* Set one SCRIPT_STATE item being returned */
if (index + 1 > cMaxItems) return E_OUTOFMEMORY;
if (pcItems) *pcItems = index;
/* Set SCRIPT_ITEM */
......
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