View | Details | Raw Unified | Return to bug 62666
Collapse All | Expand All

(-)gd-2.0.33/gd_png.c.CAN-2004-0941 (+8 lines)
Lines 188-193 Link Here
188
188
189
  png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
189
  png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
190
		&interlace_type, NULL, NULL);
190
		&interlace_type, NULL, NULL);
191
  if (overflow2(sizeof (int), width)) 
192
    {
193
      return NULL;
194
    }
195
  if (overflow2(sizeof (int) * width, height)) 
196
    {
197
      return NULL;
198
    }  
191
  if ((color_type == PNG_COLOR_TYPE_RGB) ||
199
  if ((color_type == PNG_COLOR_TYPE_RGB) ||
192
      (color_type == PNG_COLOR_TYPE_RGB_ALPHA))
200
      (color_type == PNG_COLOR_TYPE_RGB_ALPHA))
193
    {
201
    {

Return to bug 62666