diff options
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 | { |