From af919fa36feaa4ac3c0f6013da4615207ce54378 Mon Sep 17 00:00:00 2001 From: "mats.palmgren@bredband.net" Date: Sun, 27 Apr 2008 14:10:23 -0700 Subject: [PATCH] Wallpaper a crash. b=430814 r=bernd sr=roc a1.9=mconnor --- layout/tables/nsTablePainter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layout/tables/nsTablePainter.cpp b/layout/tables/nsTablePainter.cpp index 785524486246..c59db5ce4178 100644 --- a/layout/tables/nsTablePainter.cpp +++ b/layout/tables/nsTablePainter.cpp @@ -613,6 +613,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()) {