GNU bug report logs -
#11141
24.0.94; crash with `x-popup-dialog'
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Sat, 31 Mar 2012 21:25:02 UTC
Severity: normal
Found in version 24.0.94
Done: Andreas Schwab <schwab <at> linux-m68k.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Please try this.
Andreas.
* w32menu.c (is_simple_dialog): Properly check lisp types.
diff --git a/src/w32menu.c b/src/w32menu.c
index b5cc680..b25edf0 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -1173,18 +1173,23 @@ w32_dialog_show (FRAME_PTR f, int keymaps,
static int
is_simple_dialog (Lisp_Object contents)
{
- Lisp_Object options = XCDR (contents);
+ Lisp_Object options;
Lisp_Object name, yes, no, other;
+ if (!CONSP (contents))
+ return 0;
+ options = XCDR (contents);
+
yes = build_string ("Yes");
no = build_string ("No");
if (!CONSP (options))
return 0;
- name = XCAR (XCAR (options));
- if (!CONSP (options))
+ name = XCAR (options);
+ if (!CONSP (name))
return 0;
+ name = XCAR (name);
if (!NILP (Fstring_equal (name, yes)))
other = no;
@@ -1197,7 +1202,10 @@ is_simple_dialog (Lisp_Object contents)
if (!CONSP (options))
return 0;
- name = XCAR (XCAR (options));
+ name = XCAR (options);
+ if (!CONSP (name))
+ return 0;
+ name = XCAR (name);
if (NILP (Fstring_equal (name, other)))
return 0;
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
This bug report was last modified 13 years and 58 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.