all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: dgutov@yandex.ru
Cc: 39662@debbugs.gnu.org, thibault@thb.lt
Subject: bug#39662: 28.0.50; Emacs crashes in x_cr_define_fringe_bitmap if (fringe-mode 0)
Date: Wed, 26 Feb 2020 10:56:41 +0100	[thread overview]
Message-ID: <m2eeuh7jty.fsf@gmail.com> (raw)
In-Reply-To: <83ftf6lh79.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 19 Feb 2020 17:39:22 +0200")

>>>>> On Wed, 19 Feb 2020 17:39:22 +0200, Eli Zaretskii <eliz@gnu.org> said:
    >> Maybe signaling an error is best :-)

    Eli> That was my original suggestion/tendency, so I obviously agree.

Dmitry, would the following work for you? Thereʼs a potential similar
issue with HEIGHT, but Iʼm not planning on touching that just yet.

diff --git a/src/fringe.c b/src/fringe.c
index 97aad843c2..2a46e3c34f 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -1500,7 +1500,8 @@ DEFUN ("define-fringe-bitmap", Fdefine_fringe_bitmap, Sdefine_fringe_bitmap,
 BITMAP is a symbol identifying the new fringe bitmap.
 BITS is either a string or a vector of integers.
 HEIGHT is height of bitmap.  If HEIGHT is nil, use length of BITS.
-WIDTH must be an integer between 1 and 16, or nil which defaults to 8.
+WIDTH must be an integer from 1 to 16, or nil which defaults to 8.  An
+error is signaled if WIDTH is outside this range.
 Optional fifth arg ALIGN may be one of `top', `center', or `bottom',
 indicating the positioning of the bitmap relative to the rows where it
 is used; the default is to center the bitmap.  Fifth arg may also be a
@@ -1535,7 +1536,9 @@ list (ALIGN PERIODIC) where PERIODIC non-nil specifies that the bitmap
   else
     {
       CHECK_FIXNUM (width);
-      fb.width = max (0, min (XFIXNUM (width), 255));
+      fb.width = max (1, min (XFIXNUM (width), 16));
+      if (fb.width != XFIXNUM (width))
+        args_out_of_range (width, build_string ("Width must be from 1 to 16"));
     }
 
   fb.period = 0;





  reply	other threads:[~2020-02-26  9:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18 15:06 bug#39662: 28.0.50; Emacs crashes in x_cr_define_fringe_bitmap if (fringe-mode 0) Thibault Polge
2020-02-18 15:45 ` Robert Pluim
2020-02-18 16:54   ` Thibault Polge
2020-02-18 19:32     ` Robert Pluim
2020-02-18 19:50       ` Eli Zaretskii
2020-02-18 20:03         ` Robert Pluim
2020-02-18 20:12           ` Eli Zaretskii
2020-02-18 20:29             ` Dmitry Gutov
2020-02-18 20:34               ` Robert Pluim
2020-02-18 21:32                 ` Dmitry Gutov
2020-02-19  3:27               ` Eli Zaretskii
2020-02-19  8:59                 ` Robert Pluim
2020-02-19 15:39                   ` Eli Zaretskii
2020-02-26  9:56                     ` Robert Pluim [this message]
2020-02-26 14:27                       ` Dmitry Gutov
2020-02-26 15:27                         ` Robert Pluim
2020-02-26 17:55                           ` Eli Zaretskii
2020-02-26 18:36                             ` Robert Pluim
2020-02-18 19:29   ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2eeuh7jty.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=39662@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=thibault@thb.lt \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.