diff --git a/mozilla/layout/tables/nsTablePainter.cpp b/mozilla/layout/tables/nsTablePainter.cpp index ee6128188e4..4a3443fa2fa 100644 --- a/mozilla/layout/tables/nsTablePainter.cpp +++ b/mozilla/layout/tables/nsTablePainter.cpp @@ -587,6 +587,9 @@ TableBackgroundPainter::PaintCell(nsTableCellFrame* aCell, PRInt32 colIndex; aCell->GetColIndex(colIndex); + NS_ASSERTION(colIndex < mNumCols, "prevent array boundary violation"); + if (mNumCols <= colIndex) + return NS_OK; //Paint column group background if (mCols && mCols[colIndex].mColGroup && mCols[colIndex].mColGroup->IsVisible()) {