Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
74ca2eb3
Commit
74ca2eb3
authored
Jun 19, 2011
by
Paul Eggert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
Don't assume string length fits in int.
parent
9bda3520
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
13 deletions
+6
-13
src/ChangeLog
src/ChangeLog
+3
-0
src/image.c
src/image.c
+3
-13
No files found.
src/ChangeLog
View file @
74ca2eb3
2011-06-20 Paul Eggert <eggert@cs.ucla.edu>
* image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
Don't assume string length fits in int.
* gtkutil.c (style_changed_cb): Avoid need for strlen.
* font.c: Don't assume string length fits in int.
...
...
src/image.c
View file @
74ca2eb3
...
...
@@ -3589,25 +3589,14 @@ xpm_load (struct frame *f, struct image *img)
/* XPM support functions for NS where libxpm is not available.
Only XPM version 3 (without any extensions) is supported. */
static int xpm_scan (const unsigned char **, const unsigned char *,
const unsigned char **, int *);
static Lisp_Object xpm_make_color_table_v
(void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
Lisp_Object (**) (Lisp_Object, const unsigned char *, int));
static void xpm_put_color_table_v (Lisp_Object, const unsigned char *,
int, Lisp_Object);
static Lisp_Object xpm_get_color_table_v (Lisp_Object,
const unsigned char *, int);
static Lisp_Object xpm_make_color_table_h
(void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
Lisp_Object (**) (Lisp_Object, const unsigned char *, int));
static void xpm_put_color_table_h (Lisp_Object, const unsigned char *,
int, Lisp_Object);
static Lisp_Object xpm_get_color_table_h (Lisp_Object,
const unsigned char *, int);
static int xpm_str_to_color_key (const char *);
static int xpm_load_image (struct frame *, struct image *,
const unsigned char *, const unsigned char *);
/* Tokens returned from xpm_scan. */
...
...
@@ -3629,7 +3618,7 @@ static int
xpm_scan (const unsigned char **s,
const unsigned char *end,
const unsigned char **beg,
in
t *len)
ptrdiff_
t *len)
{
int c;
...
...
@@ -3799,7 +3788,8 @@ xpm_load_image (struct frame *f,
unsigned char buffer[BUFSIZ];
int width, height, x, y;
int num_colors, chars_per_pixel;
int len, LA1;
ptrdiff_t len;
int LA1;
void (*put_color_table) (Lisp_Object, const unsigned char *, int, Lisp_Object);
Lisp_Object (*get_color_table) (Lisp_Object, const unsigned char *, int);
Lisp_Object frame, color_symbols, color_table;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment