(pbm_load): Check image size for monochrome pbm.
This commit is contained in:
parent
c38ffbcb4e
commit
c295e710a2
1 changed files with 11 additions and 1 deletions
12
src/image.c
12
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue