GNU bug report logs -
#36337
26.1; XBM images are sometimes not displayed correctly
Previous Next
Reported by: Markus Triska <triska <at> metalevel.at>
Date: Sun, 23 Jun 2019 07:16:01 UTC
Severity: normal
Tags: fixed
Found in version 26.1
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 36337 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The code does indeed assume that it is passed a bool vector which is
padded to a multiple of 8 bits per line, but doesn't verify that the
bool vector it is passed indeed matches this format, so it displays
past the end of the bool vector.
This is easy enough to fix by rewriting the bool vector, but that's
potentially very slow (on debug builds), so maybe we shouldn't do
that?
Does the attached patch work for you?
On Sun, Jun 23, 2019 at 7:16 AM Markus Triska <triska <at> metalevel.at> wrote:
>
>
> Please start Emacs with "$ emacs -Q", and insert the form:
>
> (let* ((width 100)
> (height 100)
> (data (make-bool-vector (* width height) t)))
> (insert "\n")
> (insert-image `(image :type xbm
> :data ,data
> :width ,width
> :height ,height) "t")
> (insert "\n"))
>
> Please move point to the end of the form, and evaluate it with C-x C-e.
>
> This displays a 100x100 XBM image. However, the bottom of the image is
> not displayed as intended: I see a mix of black and white pixels at the
> bottom of the image, whereas I intend it to be filled with black pixels.
>
> For comparison, it works correctly when I change both width and height
> from 100 to 200, or both to 400, and also for several other values.
>
> In GNU Emacs 26.1 (build 1, x86_64-apple-darwin15.3.0, X toolkit, Xaw scroll bars)
> of 2018-09-22
> Windowing system distributor 'The X.Org Foundation', version 11.0.11502000
>
> Configured features:
> XPM JPEG TIFF GIF PNG GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE XFT
> ZLIB TOOLKIT_SCROLL_BARS LUCID X11 MODULES THREADS LCMS2
>
>
>
>
[0001-Don-t-assume-the-width-of-xbm-images-is-divisible-by.patch (text/x-patch, attachment)]
This bug report was last modified 5 years and 300 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.