HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b55252e
)
(pbm_load): Signal error for invalid image size.
author
Chong Yidong
<cyd@stupidchicken.com>
Sun, 18 Mar 2007 23:09:57 +0000
(23:09 +0000)
committer
Chong Yidong
<cyd@stupidchicken.com>
Sun, 18 Mar 2007 23:09:57 +0000
(23:09 +0000)
src/image.c
patch
|
blob
|
blame
|
history
diff --git
a/src/image.c
b/src/image.c
index
c58e0d4
..
b8317b1
100644
(file)
--- a/
src/image.c
+++ b/
src/image.c
@@
-5742,6
+5742,14
@@
pbm_load (f, img)
}
else
{
+ if (raw_p && (p + 3 * height * width > end))
+ {
+ x_destroy_x_image (ximg);
+ image_error ("Invalid image size in image `%s'",
+ img->spec, Qnil);
+ goto error;
+ }
+
for (y = 0; y < height; ++y)
for (x = 0; x < width; ++x)
{