diff options
| author | Paul Eggert | 2011-06-22 09:15:41 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-22 09:15:41 -0700 |
| commit | 31fd4b3280acee4030efde84a0e23ae2b006ee31 (patch) | |
| tree | 0b2245daf7e6f772cbaabf8916faeb34683bb390 /src/xterm.c | |
| parent | ddb7ffeeb8ace6501eb453f50f0f9f6852eda21f (diff) | |
| parent | 510005210ac9f4d813c4a2cc99b2c3c11e57c055 (diff) | |
| download | emacs-31fd4b3280acee4030efde84a0e23ae2b006ee31.tar.gz emacs-31fd4b3280acee4030efde84a0e23ae2b006ee31.zip | |
Merge: Integer overflow and signedness fixes (Bug#8873).
A few related buffer overrun fixes, too.
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/xterm.c b/src/xterm.c index f40d260dabe..32fbab55008 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -356,7 +356,7 @@ static int x_dispatch_event (XEvent *, Display *); | |||
| 356 | interference with debugging failing X calls. */ | 356 | interference with debugging failing X calls. */ |
| 357 | static void x_connection_closed (Display *, const char *); | 357 | static void x_connection_closed (Display *, const char *); |
| 358 | static void x_wm_set_window_state (struct frame *, int); | 358 | static void x_wm_set_window_state (struct frame *, int); |
| 359 | static void x_wm_set_icon_pixmap (struct frame *, int); | 359 | static void x_wm_set_icon_pixmap (struct frame *, ptrdiff_t); |
| 360 | static void x_initialize (void); | 360 | static void x_initialize (void); |
| 361 | 361 | ||
| 362 | 362 | ||
| @@ -7427,7 +7427,7 @@ x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x, int | |||
| 7427 | int | 7427 | int |
| 7428 | x_bitmap_icon (struct frame *f, Lisp_Object file) | 7428 | x_bitmap_icon (struct frame *f, Lisp_Object file) |
| 7429 | { | 7429 | { |
| 7430 | int bitmap_id; | 7430 | ptrdiff_t bitmap_id; |
| 7431 | 7431 | ||
| 7432 | if (FRAME_X_WINDOW (f) == 0) | 7432 | if (FRAME_X_WINDOW (f) == 0) |
| 7433 | return 1; | 7433 | return 1; |
| @@ -7453,7 +7453,7 @@ x_bitmap_icon (struct frame *f, Lisp_Object file) | |||
| 7453 | /* Create the GNU bitmap and mask if necessary. */ | 7453 | /* Create the GNU bitmap and mask if necessary. */ |
| 7454 | if (FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id < 0) | 7454 | if (FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id < 0) |
| 7455 | { | 7455 | { |
| 7456 | int rc = -1; | 7456 | ptrdiff_t rc = -1; |
| 7457 | 7457 | ||
| 7458 | #ifdef USE_GTK | 7458 | #ifdef USE_GTK |
| 7459 | 7459 | ||
| @@ -8084,7 +8084,7 @@ xim_initialize (struct x_display_info *dpyinfo, char *resource_name) | |||
| 8084 | { | 8084 | { |
| 8085 | #ifdef HAVE_X11R6_XIM | 8085 | #ifdef HAVE_X11R6_XIM |
| 8086 | struct xim_inst_t *xim_inst; | 8086 | struct xim_inst_t *xim_inst; |
| 8087 | int len; | 8087 | ptrdiff_t len; |
| 8088 | 8088 | ||
| 8089 | xim_inst = (struct xim_inst_t *) xmalloc (sizeof (struct xim_inst_t)); | 8089 | xim_inst = (struct xim_inst_t *) xmalloc (sizeof (struct xim_inst_t)); |
| 8090 | dpyinfo->xim_callback_data = xim_inst; | 8090 | dpyinfo->xim_callback_data = xim_inst; |
| @@ -9601,7 +9601,7 @@ x_wm_set_window_state (struct frame *f, int state) | |||
| 9601 | } | 9601 | } |
| 9602 | 9602 | ||
| 9603 | static void | 9603 | static void |
| 9604 | x_wm_set_icon_pixmap (struct frame *f, int pixmap_id) | 9604 | x_wm_set_icon_pixmap (struct frame *f, ptrdiff_t pixmap_id) |
| 9605 | { | 9605 | { |
| 9606 | Pixmap icon_pixmap, icon_mask; | 9606 | Pixmap icon_pixmap, icon_mask; |
| 9607 | 9607 | ||
| @@ -9720,8 +9720,8 @@ same_x_server (const char *name1, const char *name2) | |||
| 9720 | { | 9720 | { |
| 9721 | int seen_colon = 0; | 9721 | int seen_colon = 0; |
| 9722 | const char *system_name = SSDATA (Vsystem_name); | 9722 | const char *system_name = SSDATA (Vsystem_name); |
| 9723 | int system_name_length = strlen (system_name); | 9723 | ptrdiff_t system_name_length = SBYTES (Vsystem_name); |
| 9724 | int length_until_period = 0; | 9724 | ptrdiff_t length_until_period = 0; |
| 9725 | 9725 | ||
| 9726 | while (system_name[length_until_period] != 0 | 9726 | while (system_name[length_until_period] != 0 |
| 9727 | && system_name[length_until_period] != '.') | 9727 | && system_name[length_until_period] != '.') |