aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2007-03-18 23:09:57 +0000
committerChong Yidong2007-03-18 23:09:57 +0000
commit39e653ead8fb85137f5d5d060ad658150c698486 (patch)
tree18c9b845d1301cabb7c72689d628ffb1f19f37bd /src
parentb55252e06b5bbdde1f8f31d91faef474973cf965 (diff)
downloademacs-39e653ead8fb85137f5d5d060ad658150c698486.tar.gz
emacs-39e653ead8fb85137f5d5d060ad658150c698486.zip
(pbm_load): Signal error for invalid image size.
Diffstat (limited to 'src')
-rw-r--r--src/image.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/image.c b/src/image.c
index c58e0d4695e..b8317b1e982 100644
--- a/src/image.c
+++ b/src/image.c
@@ -5742,6 +5742,14 @@ pbm_load (f, img)
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 {