(pbm_load): Signal error for invalid image size.
This commit is contained in:
parent
b55252e06b
commit
39e653ead8
1 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue