Mercurial > emacs
diff src/image.c @ 76550:05fce28aea26
(pbm_load): Signal error for invalid image size.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 18 Mar 2007 23:09:57 +0000 |
parents | 3d45362f1d38 |
children | f6cc3f58ce04 738ce3540ffb c0409ee15cee |
line wrap: on
line diff
--- a/src/image.c Sun Mar 18 23:09:49 2007 +0000 +++ b/src/image.c Sun Mar 18 23:09:57 2007 +0000 @@ -5742,6 +5742,14 @@ } 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) {