Branch: Tag:

2004-08-11

2004-08-11 08:29:29 by Per Hedbor <ph@opera.com>

Avoid crashing when encountering huge images

Rev: src/modules/Image/encodings/png.c:1.65
Rev: src/modules/Image/encodings/ras.c:1.22
Rev: src/modules/Image/encodings/tga.c:1.37
Rev: src/modules/Image/encodings/xcf.c:1.50

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: xcf.c,v 1.49 2004/05/19 00:08:02 nilsson Exp $ + || $Id: xcf.c,v 1.50 2004/08/11 08:29:29 per Exp $   */      #include "global.h" - RCSID("$Id: xcf.c,v 1.49 2004/05/19 00:08:02 nilsson Exp $"); + RCSID("$Id: xcf.c,v 1.50 2004/08/11 08:29:29 per Exp $");      #include "image_machine.h"   
1243:    ewidth = MINIMUM(TILE_WIDTH, (rxs-x));    eheight = MINIMUM(TILE_HEIGHT, (rys-y));    +  if( (double)ewidth * eheight * bpp > INT_MAX ) +  Pike_error("Insanely large tiles not supported\n");    if(rle)    {    struct buffer s = tile, od, d;