unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Carlos Pita <carlosjosepita@gmail.com>
Cc: 37756@debbugs.gnu.org
Subject: bug#37756: [PATCH] Wrong initialization of fringe bitmap
Date: Tue, 15 Oct 2019 12:47:26 +0300	[thread overview]
Message-ID: <838spmgx1t.fsf@gnu.org> (raw)
In-Reply-To: <CAELgYheP_R7LoEcV8GqqOy218FLPU99qV5_UZPwaRG2VKufZUQ@mail.gmail.com> (message from Carlos Pita on Mon, 14 Oct 2019 23:39:19 -0300)

> From: Carlos Pita <carlosjosepita@gmail.com>
> Date: Mon, 14 Oct 2019 23:39:19 -0300
> 
> In fringe.c:1606 you have:
> 
>   xfb = xmalloc (sizeof fb + fb.height * BYTES_PER_BITMAP_ROW);
>   fb.bits = b = ((unsigned short *)
> ptr_bounds_clip (xfb + 1, fb.height * BYTES_PER_BITMAP_ROW));
>   xfb = ptr_bounds_clip (xfb, sizeof *xfb);
>   memset (b, 0, fb.height);
> 
> I might be wrong but it seems to me that the last line should be:
> 
>   memset (b, 0, fb.height * BYTES_PER_BITMAP_ROW);
> 
> instead.

Can you explain your reasoning?  The loop after that does initialize
the structure as needed, doesn't it?





  reply	other threads:[~2019-10-15  9:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15  2:39 bug#37756: [PATCH] Wrong initialization of fringe bitmap Carlos Pita
2019-10-15  9:47 ` Eli Zaretskii [this message]
2019-10-15 10:14   ` Carlos Pita
2019-10-16 17:28     ` Carlos Pita
2019-10-16 18:35       ` Eli Zaretskii
2019-10-16 18:54         ` Carlos Pita
2019-10-16 19:05           ` Eli Zaretskii
2019-10-16 20:01             ` Carlos Pita
2019-10-17 11:53               ` Alan Third
2019-10-17 15:01                 ` Robert Pluim
2019-10-26 10:21               ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=838spmgx1t.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=37756@debbugs.gnu.org \
    --cc=carlosjosepita@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).