unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24064: 24.5; NULL pointer dereference in compute_motion(), indent.c
@ 2016-07-24 23:51 Sergei Litvin
  2016-07-25 16:24 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Sergei Litvin @ 2016-07-24 23:51 UTC (permalink / raw)
  To: 24064

[-- Attachment #1: Type: text/plain, Size: 1092 bytes --]

Package: emacs

Version: 24.5

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;
...


Sergei Litvin


[-- Attachment #2: Type: text/html, Size: 1827 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-07-26 16:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-24 23:51 bug#24064: 24.5; NULL pointer dereference in compute_motion(), indent.c Sergei Litvin
2016-07-25 16:24 ` Eli Zaretskii
2016-07-25 22:02   ` Sergei Litvin
2016-07-25 22:37     ` Clément Pit--Claudel
2016-07-26  2:33       ` npostavs
2016-07-26  2:49         ` Clément Pit--Claudel
2016-07-26 15:35           ` Eli Zaretskii
2016-07-26 16:04             ` Clément Pit--Claudel

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).