Bug 724456. Don't assume that sizeof(bool) == 1 when memsetting arrays of bools in nsLineBreaker. r=bzbarsky

This commit is contained in:
Cameron Kaiser 2012-02-06 13:02:22 -05:00
parent 6e8b40d35a
commit 8b76d285cd

View File

@ -206,7 +206,7 @@ nsLineBreaker::AppendText(nsIAtom* aLangGroup, const PRUnichar* aText, PRUint32
if (aSink && (aFlags & BREAK_NEED_CAPITALIZATION)) {
if (!capitalizationState.AppendElements(aLength))
return NS_ERROR_OUT_OF_MEMORY;
memset(capitalizationState.Elements(), false, aLength);
memset(capitalizationState.Elements(), false, aLength*sizeof(bool));
}
PRUint32 start = offset;