diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/xterm.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f0752ff8e0c..41b2fe9aab0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2011-06-21 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-06-21 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int. | ||
| 4 | |||
| 3 | * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen. | 5 | * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen. |
| 4 | (x_session_initialize): Do not assume string length fits in int. | 6 | (x_session_initialize): Do not assume string length fits in int. |
| 5 | 7 | ||
diff --git a/src/xterm.c b/src/xterm.c index f40d260dabe..c1134521c71 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -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; |
| @@ -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] != '.') |