Subject: bug#10743: 24.0.93; missing type checking for Vtool_bar_button_margin in x_draw_image_relief

From: YAMAMOTO Mitsuharu <[email-masked]>
Date: Tue, 07 Feb 2012 09:48:18 +0900

The current code in x_draw_image_relief (in xterm.c) applies XINT to
Vtool_bar_button_margin without INTEGERP:

  2326	  extra = s->face->id == TOOL_BAR_FACE_ID
  2327	    ? XINT (Vtool_bar_button_margin) : 0;

Other than an integer, a cons of integers is also a valid value for
Vtool_bar_button_margin.

				     YAMAMOTO Mitsuharu
				[email-masked]

In GNU Emacs 24.0.93.1 (x86_64-apple-darwin11.3.0, X toolkit, Xaw scroll bars)
 of 2012-02-07 on yamamoto-no-iMac.local
Windowing system distributor `The X.Org Foundation', version 11.0.11003000
Configured using:
 `configure '--with-jpeg=no' '--with-gif=no' '--with-tiff=no'
 '--enable-asserts' '--enable-checking''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ja_JP.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t