diff options
| author | Paul Eggert | 2011-08-04 19:15:35 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-08-04 19:15:35 -0700 |
| commit | 0065d05491ce5981ea20896bb26d21dcd31e6769 (patch) | |
| tree | 13240167319d4a99ab5eacae4a883258eb2d28de /src/image.c | |
| parent | 18ab493650d648ab8dca651ea2698861f926e895 (diff) | |
| download | emacs-0065d05491ce5981ea20896bb26d21dcd31e6769.tar.gz emacs-0065d05491ce5981ea20896bb26d21dcd31e6769.zip | |
Adjust in response to jan.h.d's comments.
See, for example <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#26>.
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/image.c b/src/image.c index d2a71637fed..bf7daa24da1 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -3586,11 +3586,7 @@ xpm_load (struct frame *f, struct image *img) | |||
| 3586 | #endif /* HAVE_NTGUI */ | 3586 | #endif /* HAVE_NTGUI */ |
| 3587 | 3587 | ||
| 3588 | /* Remember allocated colors. */ | 3588 | /* Remember allocated colors. */ |
| 3589 | if (min (PTRDIFF_MAX, SIZE_MAX) / sizeof *img->colors | 3589 | img->colors = xnmalloc (attrs.nalloc_pixels, sizeof *img->colors); |
| 3590 | < attrs.nalloc_pixels) | ||
| 3591 | memory_full (SIZE_MAX); | ||
| 3592 | img->colors = (unsigned long *) xmalloc (img->ncolors | ||
| 3593 | * sizeof *img->colors); | ||
| 3594 | img->ncolors = attrs.nalloc_pixels; | 3590 | img->ncolors = attrs.nalloc_pixels; |
| 3595 | for (i = 0; i < attrs.nalloc_pixels; ++i) | 3591 | for (i = 0; i < attrs.nalloc_pixels; ++i) |
| 3596 | { | 3592 | { |