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
3de73e5e
Commit
3de73e5e
authored
Jun 21, 2011
by
Paul Eggert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
parent
2606c57b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
src/ChangeLog
src/ChangeLog
+2
-0
src/xterm.c
src/xterm.c
+3
-3
No files found.
src/ChangeLog
View file @
3de73e5e
2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
* xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
* xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
(x_session_initialize): Do not assume string length fits in int.
...
...
src/xterm.c
View file @
3de73e5e
...
...
@@ -8084,7 +8084,7 @@ xim_initialize (struct x_display_info *dpyinfo, char *resource_name)
{
#ifdef HAVE_X11R6_XIM
struct xim_inst_t *xim_inst;
in
t len;
ptrdiff_
t len;
xim_inst = (struct xim_inst_t *) xmalloc (sizeof (struct xim_inst_t));
dpyinfo->xim_callback_data = xim_inst;
...
...
@@ -9720,8 +9720,8 @@ same_x_server (const char *name1, const char *name2)
{
int seen_colon = 0;
const char *system_name = SSDATA (Vsystem_name);
in
t system_name_length =
strlen
(system_name);
in
t length_until_period = 0;
ptrdiff_
t system_name_length =
SBYTES
(
V
system_name);
ptrdiff_
t length_until_period = 0;
while (system_name[length_until_period] != 0
&& system_name[length_until_period] != '.')
...
...
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