GNU bug report logs - #24064
24.5; NULL pointer dereference in compute_motion(), indent.c

Previous Next

Package: emacs;

Reported by: Sergei Litvin <litvindev <at> gmail.com>

Date: Mon, 25 Jul 2016 02:41:02 UTC

Severity: normal

Found in version 24.5

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 24064 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sergei Litvin <litvindev <at> gmail.com>
Cc: 24064 <at> debbugs.gnu.org
Subject: Re: bug#24064: 24.5;
 NULL pointer dereference in compute_motion(), indent.c
Date: Mon, 25 Jul 2016 19:24:14 +0300
> From: Sergei Litvin <litvindev <at> gmail.com>
> Date: Mon, 25 Jul 2016 02:51:40 +0300
> 
> 
> struct position *
> compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
> EMACS_INT fromhpos, bool did_motion, ptrdiff_t to,
> EMACS_INT tovpos, EMACS_INT tohpos, EMACS_INT width,
> ptrdiff_t hscroll, int tab_offset, struct window *win)
> {
> 
> ...
> 
> if (dp == buffer_display_table ())
> width_table = (VECTORP (BVAR (current_buffer, width_table))
> ? XVECTOR (BVAR (current_buffer, width_table))->contents
> : 0);
> else
> /* If the window has its own display table, we can't use the width
> run cache, because that's based on the buffer's display table. */
> width_table = 0; // initialize it with 0 (current buffer has no display table)
> 
> ...
> 
> if (width_cache)
> {
> /* Is this character part of the current run? If so, extend
> the run. */
> if (pos - 1 == width_run_end
> && XFASTINT (width_table[c]) == width_run_width) // dereference width_table here, and crash
> width_run_end = pos;

Did you actually see such a crash, and if so, can you show a recipe
for reproducing that?

Thanks.




This bug report was last modified 8 years and 296 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.