diff options
| author | Paul Eggert | 2011-03-24 00:36:32 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-03-24 00:36:32 -0700 |
| commit | 03d0a10961746346940115a5ff1779f4e7a455f7 (patch) | |
| tree | 55c4f15d931d15916578e81927880ab43a2c6787 /src | |
| parent | 44f730c85e90d32d205e4d6ea2284de2eda4aacf (diff) | |
| download | emacs-03d0a10961746346940115a5ff1779f4e7a455f7.tar.gz emacs-03d0a10961746346940115a5ff1779f4e7a455f7.zip | |
* image.c (tiff_load): Fix off-by-one image count (Bug#8336).
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/image.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index cdde9673fbd..998e2014c69 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2011-03-24 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-03-24 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * image.c (tiff_load): Fix off-by-one image count (Bug#8336). | ||
| 4 | |||
| 3 | * xselect.c (x_check_property_data): Return correct size (Bug#8335). | 5 | * xselect.c (x_check_property_data): Return correct size (Bug#8335). |
| 4 | 6 | ||
| 5 | 2011-03-23 Paul Eggert <eggert@cs.ucla.edu> | 7 | 2011-03-23 Paul Eggert <eggert@cs.ucla.edu> |
diff --git a/src/image.c b/src/image.c index 7584f9bb2c0..695ac143fde 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -6754,7 +6754,7 @@ tiff_load (struct frame *f, struct image *img) | |||
| 6754 | TIFF *tiff; | 6754 | TIFF *tiff; |
| 6755 | int width, height, x, y, count; | 6755 | int width, height, x, y, count; |
| 6756 | uint32 *buf; | 6756 | uint32 *buf; |
| 6757 | int rc, rc2; | 6757 | int rc; |
| 6758 | XImagePtr ximg; | 6758 | XImagePtr ximg; |
| 6759 | tiff_memory_source memsrc; | 6759 | tiff_memory_source memsrc; |
| 6760 | Lisp_Object image; | 6760 | Lisp_Object image; |
| @@ -6842,8 +6842,8 @@ tiff_load (struct frame *f, struct image *img) | |||
| 6842 | rc = fn_TIFFReadRGBAImage (tiff, width, height, buf, 0); | 6842 | rc = fn_TIFFReadRGBAImage (tiff, width, height, buf, 0); |
| 6843 | 6843 | ||
| 6844 | /* Count the number of images in the file. */ | 6844 | /* Count the number of images in the file. */ |
| 6845 | for (count = 1, rc2 = 1; rc2; count++) | 6845 | for (count = 1; fn_TIFFSetDirectory (tiff, count); count++) |
| 6846 | rc2 = fn_TIFFSetDirectory (tiff, count); | 6846 | continue; |
| 6847 | 6847 | ||
| 6848 | if (count > 1) | 6848 | if (count > 1) |
| 6849 | img->data.lisp_val = Fcons (Qcount, | 6849 | img->data.lisp_val = Fcons (Qcount, |