aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog3
-rw-r--r--src/image.c16
2 files changed, 6 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 16e8342ee0b..4928e209364 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12011-06-20 Paul Eggert <eggert@cs.ucla.edu> 12011-06-20 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
4 Don't assume string length fits in int.
5
3 * gtkutil.c (style_changed_cb): Avoid need for strlen. 6 * gtkutil.c (style_changed_cb): Avoid need for strlen.
4 7
5 * font.c: Don't assume string length fits in int. 8 * font.c: Don't assume string length fits in int.
diff --git a/src/image.c b/src/image.c
index 352f8c486e4..b5b93cb5b69 100644
--- a/src/image.c
+++ b/src/image.c
@@ -3589,25 +3589,14 @@ xpm_load (struct frame *f, struct image *img)
3589/* XPM support functions for NS where libxpm is not available. 3589/* XPM support functions for NS where libxpm is not available.
3590 Only XPM version 3 (without any extensions) is supported. */ 3590 Only XPM version 3 (without any extensions) is supported. */
3591 3591
3592static int xpm_scan (const unsigned char **, const unsigned char *,
3593 const unsigned char **, int *);
3594static Lisp_Object xpm_make_color_table_v
3595 (void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
3596 Lisp_Object (**) (Lisp_Object, const unsigned char *, int));
3597static void xpm_put_color_table_v (Lisp_Object, const unsigned char *, 3592static void xpm_put_color_table_v (Lisp_Object, const unsigned char *,
3598 int, Lisp_Object); 3593 int, Lisp_Object);
3599static Lisp_Object xpm_get_color_table_v (Lisp_Object, 3594static Lisp_Object xpm_get_color_table_v (Lisp_Object,
3600 const unsigned char *, int); 3595 const unsigned char *, int);
3601static Lisp_Object xpm_make_color_table_h
3602 (void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
3603 Lisp_Object (**) (Lisp_Object, const unsigned char *, int));
3604static void xpm_put_color_table_h (Lisp_Object, const unsigned char *, 3596static void xpm_put_color_table_h (Lisp_Object, const unsigned char *,
3605 int, Lisp_Object); 3597 int, Lisp_Object);
3606static Lisp_Object xpm_get_color_table_h (Lisp_Object, 3598static Lisp_Object xpm_get_color_table_h (Lisp_Object,
3607 const unsigned char *, int); 3599 const unsigned char *, int);
3608static int xpm_str_to_color_key (const char *);
3609static int xpm_load_image (struct frame *, struct image *,
3610 const unsigned char *, const unsigned char *);
3611 3600
3612/* Tokens returned from xpm_scan. */ 3601/* Tokens returned from xpm_scan. */
3613 3602
@@ -3629,7 +3618,7 @@ static int
3629xpm_scan (const unsigned char **s, 3618xpm_scan (const unsigned char **s,
3630 const unsigned char *end, 3619 const unsigned char *end,
3631 const unsigned char **beg, 3620 const unsigned char **beg,
3632 int *len) 3621 ptrdiff_t *len)
3633{ 3622{
3634 int c; 3623 int c;
3635 3624
@@ -3799,7 +3788,8 @@ xpm_load_image (struct frame *f,
3799 unsigned char buffer[BUFSIZ]; 3788 unsigned char buffer[BUFSIZ];
3800 int width, height, x, y; 3789 int width, height, x, y;
3801 int num_colors, chars_per_pixel; 3790 int num_colors, chars_per_pixel;
3802 int len, LA1; 3791 ptrdiff_t len;
3792 int LA1;
3803 void (*put_color_table) (Lisp_Object, const unsigned char *, int, Lisp_Object); 3793 void (*put_color_table) (Lisp_Object, const unsigned char *, int, Lisp_Object);
3804 Lisp_Object (*get_color_table) (Lisp_Object, const unsigned char *, int); 3794 Lisp_Object (*get_color_table) (Lisp_Object, const unsigned char *, int);
3805 Lisp_Object frame, color_symbols, color_table; 3795 Lisp_Object frame, color_symbols, color_table;