Bug 381152 - prevent bandRects from having height > nscoord_MAX. r+sr=roc, a=blocking1.9

This commit is contained in:
dholbert@cs.stanford.edu 2007-11-07 03:03:10 -08:00
parent b0f8aadb99
commit feef919693

View File

@ -872,7 +872,10 @@ nsSpaceManager::AddRectRegion(nsIFrame* aFrame, const nsRect& aUnavailableSpace)
return NS_OK;
// Allocate a band rect
BandRect* bandRect = new BandRect(rect.x, rect.y, rect.XMost(), rect.YMost(), aFrame);
BandRect* bandRect = new BandRect(rect.x, rect.y,
PR_MIN(rect.XMost(), nscoord_MAX),
PR_MIN(rect.YMost(), nscoord_MAX),
aFrame);
if (nsnull == bandRect) {
return NS_ERROR_OUT_OF_MEMORY;
}