aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Schwab2012-04-01 18:42:57 +0200
committerAndreas Schwab2012-04-01 18:42:57 +0200
commit3b0512a3d5c5ef30308bc466d914c4282153d453 (patch)
treeb6e6f894162a478fe41036880c707dac4e03b93d /src
parentd6ec6cb42b6f4ee90aa2237bb8f4f465ffd1f5b7 (diff)
downloademacs-3b0512a3d5c5ef30308bc466d914c4282153d453.tar.gz
emacs-3b0512a3d5c5ef30308bc466d914c4282153d453.zip
Fixes: debbugs:11141
* w32menu.c (is_simple_dialog): Properly check lisp types.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/w32menu.c16
2 files changed, 17 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9be289c42bb..ee54c48cd94 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12012-04-01 Andreas Schwab <schwab@linux-m68k.org>
2
3 * w32menu.c (is_simple_dialog): Properly check lisp types.
4 (Bug#11141)
5
12012-03-31 Eli Zaretskii <eliz@gnu.org> 62012-03-31 Eli Zaretskii <eliz@gnu.org>
2 7
3 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the 8 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
diff --git a/src/w32menu.c b/src/w32menu.c
index b5cc6801a72..b25edf0f269 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -1173,18 +1173,23 @@ w32_dialog_show (FRAME_PTR f, int keymaps,
1173static int 1173static int
1174is_simple_dialog (Lisp_Object contents) 1174is_simple_dialog (Lisp_Object contents)
1175{ 1175{
1176 Lisp_Object options = XCDR (contents); 1176 Lisp_Object options;
1177 Lisp_Object name, yes, no, other; 1177 Lisp_Object name, yes, no, other;
1178 1178
1179 if (!CONSP (contents))
1180 return 0;
1181 options = XCDR (contents);
1182
1179 yes = build_string ("Yes"); 1183 yes = build_string ("Yes");
1180 no = build_string ("No"); 1184 no = build_string ("No");
1181 1185
1182 if (!CONSP (options)) 1186 if (!CONSP (options))
1183 return 0; 1187 return 0;
1184 1188
1185 name = XCAR (XCAR (options)); 1189 name = XCAR (options);
1186 if (!CONSP (options)) 1190 if (!CONSP (name))
1187 return 0; 1191 return 0;
1192 name = XCAR (name);
1188 1193
1189 if (!NILP (Fstring_equal (name, yes))) 1194 if (!NILP (Fstring_equal (name, yes)))
1190 other = no; 1195 other = no;
@@ -1197,7 +1202,10 @@ is_simple_dialog (Lisp_Object contents)
1197 if (!CONSP (options)) 1202 if (!CONSP (options))
1198 return 0; 1203 return 0;
1199 1204
1200 name = XCAR (XCAR (options)); 1205 name = XCAR (options);
1206 if (!CONSP (name))
1207 return 0;
1208 name = XCAR (name);
1201 if (NILP (Fstring_equal (name, other))) 1209 if (NILP (Fstring_equal (name, other)))
1202 return 0; 1210 return 0;
1203 1211