Bug 444996 - Compilation broken on various platforms. INT_MAX was not declared in this scope. r+sr=vladimir

This commit is contained in:
Robert Longson 2008-07-16 10:20:24 +01:00
Родитель b19c640964
Коммит 30c9633728
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

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