comparison src/image.c @ 76550:05fce28aea26

(pbm_load): Signal error for invalid image size.
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 18 Mar 2007 23:09:57 +0000
parents 3d45362f1d38
children f6cc3f58ce04 738ce3540ffb c0409ee15cee
comparison
equal deleted inserted replaced
76549:350d67456479 76550:05fce28aea26
5740 XPutPixel (ximg, x, y, g ? fg : bg); 5740 XPutPixel (ximg, x, y, g ? fg : bg);
5741 } 5741 }
5742 } 5742 }
5743 else 5743 else
5744 { 5744 {
5745 if (raw_p && (p + 3 * height * width > end))
5746 {
5747 x_destroy_x_image (ximg);
5748 image_error ("Invalid image size in image `%s'",
5749 img->spec, Qnil);
5750 goto error;
5751 }
5752
5745 for (y = 0; y < height; ++y) 5753 for (y = 0; y < height; ++y)
5746 for (x = 0; x < width; ++x) 5754 for (x = 0; x < width; ++x)
5747 { 5755 {
5748 int r, g, b; 5756 int r, g, b;
5749 5757