From 30c96337282498cbbea7e72775a34b2d6f2046fe Mon Sep 17 00:00:00 2001 From: Robert Longson Date: Wed, 16 Jul 2008 10:20:24 +0100 Subject: [PATCH] Bug 444996 - Compilation broken on various platforms. INT_MAX was not declared in this scope. r+sr=vladimir --- modules/libpr0n/decoders/png/nsPNGDecoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/libpr0n/decoders/png/nsPNGDecoder.cpp b/modules/libpr0n/decoders/png/nsPNGDecoder.cpp index e664a30c71f4..6922ad3c3825 100644 --- a/modules/libpr0n/decoders/png/nsPNGDecoder.cpp +++ b/modules/libpr0n/decoders/png/nsPNGDecoder.cpp @@ -655,7 +655,7 @@ info_callback(png_structp png_ptr, png_infop info_ptr) } if (interlace_type == PNG_INTERLACE_ADAM7) { - if (height < INT_MAX / (width * channels)) + if (height < PR_INT32_MAX / (width * channels)) decoder->interlacebuf = (PRUint8 *)nsMemory::Alloc(channels * width * height); if (!decoder->interlacebuf) { longjmp(decoder->mPNG->jmpbuf, 5); // NS_ERROR_OUT_OF_MEMORY