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:
c38ffbc
)
(pbm_load): Check image size for monochrome pbm.
author
Chong Yidong
<cyd@stupidchicken.com>
Mon, 14 May 2007 14:53:15 +0000
(14:53 +0000)
committer
Chong Yidong
<cyd@stupidchicken.com>
Mon, 14 May 2007 14:53:15 +0000
(14:53 +0000)
src/image.c
patch
|
blob
|
blame
|
history
diff --git
a/src/image.c
b/src/image.c
index
eacea4a
..
12b27fe
100644
(file)
--- a/
src/image.c
+++ b/
src/image.c
@@
-5730,7
+5730,17
@@
pbm_load (f, img)
if (raw_p)
{
if ((x & 7) == 0)
- c = *p++;
+ {
+ if (p >= end)
+ {
+ x_destroy_x_image (ximg);
+ x_clear_image (f, img);
+ image_error ("Invalid image size in image `%s'",
+ img->spec, Qnil);
+ goto error;
+ }
+ c = *p++;
+ }
g = c & 0x80;
c <<= 1;
}