Bug 444996 – "‘INT_MAX’ was not declared in this scope" compiling nsPNGDecoder.cpp

p=longsonr r/sr=vladimir a=samuel.sidler


git-svn-id: svn://10.0.0.236/trunk@253845 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
iann_cvs%blueyonder.co.uk
2008-08-26 22:37:27 +00:00
parent 5764dfe6d9
commit 4725ac011c

View File

@@ -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