зеркало из https://github.com/mozilla/gecko-dev.git
Bug 368860. Don't perform out-of-bounds access if we have a bogus empty previous-text-frame. r+sr=dbaron
This commit is contained in:
Родитель
cc74e411be
Коммит
aa82e980a6
|
@ -4996,9 +4996,12 @@ static PRBool CanBreakBetween(nsTextFrame* aBefore,
|
|||
firstAfter = fragAfter->CharAt(afterOffset);
|
||||
}
|
||||
while (IS_DISCARDED(lastBefore)) {
|
||||
NS_ASSERTION(beforeOffset > 0,
|
||||
"Before-textframe maps no content, should not have called SetTrailingTextFrame");
|
||||
--beforeOffset;
|
||||
if (beforeOffset == 0) {
|
||||
// aBefore was entirely skipped. Who knows why it called SetTrailingTextFrame.
|
||||
NS_WARNING("Before-frame should not have called SetTrailingTextFrame");
|
||||
return PR_FALSE;
|
||||
}
|
||||
lastBefore = fragBefore->CharAt(beforeOffset - 1);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче