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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user