- Fix buffer overflow in _ItemizeInternal
CORE-8133 #resolve

svn path=/trunk/; revision=63096
This commit is contained in:
Thomas Faber
2014-05-01 19:44:30 +00:00
parent 554ed501cb
commit 4847c9ec64
+1 -1
View File
@@ -1605,12 +1605,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 */