diff options
| author | Stefan Monnier | 2012-03-25 16:37:21 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-03-25 16:37:21 -0400 |
| commit | 699c782b7668c44d0fa4446331b0590a6d5dac82 (patch) | |
| tree | 5dcce364741d0761920a3d274b0fc8aba4103d45 /src/xsmfns.c | |
| parent | 98fb480ee31bf74cf554044f60f21df16566dd7f (diff) | |
| parent | e99a9b8bdccadded1f6fae88ee7a2a93dfd4eacf (diff) | |
| download | emacs-pending.tar.gz emacs-pending.zip | |
Merge from trunkpending
Diffstat (limited to 'src/xsmfns.c')
| -rw-r--r-- | src/xsmfns.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/xsmfns.c b/src/xsmfns.c index cb56ae648d1..1f6eb84260e 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Session management module for systems which understand the X Session | 1 | /* Session management module for systems which understand the X Session |
| 2 | management protocol. | 2 | management protocol. |
| 3 | 3 | ||
| 4 | Copyright (C) 2002-2011 Free Software Foundation, Inc. | 4 | Copyright (C) 2002-2012 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -223,9 +223,11 @@ smc_save_yourself_CB (SmcConn smcConn, | |||
| 223 | props[props_idx]->name = xstrdup (SmRestartCommand); | 223 | props[props_idx]->name = xstrdup (SmRestartCommand); |
| 224 | props[props_idx]->type = xstrdup (SmLISTofARRAY8); | 224 | props[props_idx]->type = xstrdup (SmLISTofARRAY8); |
| 225 | /* /path/to/emacs, --smid=xxx --no-splash --chdir=dir ... */ | 225 | /* /path/to/emacs, --smid=xxx --no-splash --chdir=dir ... */ |
| 226 | if (INT_MAX - 3 < initial_argc) | ||
| 227 | memory_full (SIZE_MAX); | ||
| 226 | i = 3 + initial_argc; | 228 | i = 3 + initial_argc; |
| 227 | props[props_idx]->num_vals = i; | 229 | props[props_idx]->num_vals = i; |
| 228 | vp = (SmPropValue *) xmalloc (i * sizeof(*vp)); | 230 | vp = xnmalloc (i, sizeof *vp); |
| 229 | props[props_idx]->vals = vp; | 231 | props[props_idx]->vals = vp; |
| 230 | props[props_idx]->vals[vp_idx].length = strlen (emacs_program); | 232 | props[props_idx]->vals[vp_idx].length = strlen (emacs_program); |
| 231 | props[props_idx]->vals[vp_idx++].value = emacs_program; | 233 | props[props_idx]->vals[vp_idx++].value = emacs_program; |
| @@ -460,7 +462,7 @@ x_session_initialize (struct x_display_info *dpyinfo) | |||
| 460 | Vx_session_id = build_string (client_id); | 462 | Vx_session_id = build_string (client_id); |
| 461 | 463 | ||
| 462 | #ifdef USE_GTK | 464 | #ifdef USE_GTK |
| 463 | /* GTK creats a leader window by itself, but we need to tell | 465 | /* GTK creates a leader window by itself, but we need to tell |
| 464 | it about our client_id. */ | 466 | it about our client_id. */ |
| 465 | gdk_x11_set_sm_client_id (client_id); | 467 | gdk_x11_set_sm_client_id (client_id); |
| 466 | #else | 468 | #else |