bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] fix segfault in info reader


From: Ralf Wildenhues
Subject: [PATCH] fix segfault in info reader
Date: Fri, 3 Dec 2010 19:06:51 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

$ info -k AM_PROG_CC_C_O

with the current development sources (as of a couple of weeks ago or so)
exits with a segfault for me, that is fixed by the patch below.  The
info_windows pointer is NULL for me.  I'm not sure if you need two
separate manuals matching the macro (automake and automake-1.9).

Thanks for maintaining texinfo,
Ralf

2010-12-03  Ralf Wildenhues  <address@hidden>

        * info/man.c (get_manpage_node): Avoid null pointer dereference
        of info_windows.

Index: info/man.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/info/man.c,v
retrieving revision 1.15
diff -u -p -r1.15 man.c
--- info/man.c  23 Jan 2009 09:37:40 -0000      1.15
+++ info/man.c  3 Dec 2010 17:56:48 -0000
@@ -104,7 +104,8 @@ get_manpage_node (FILE_BUFFER *file_buff
             the feet of info_windows[] array.  Therefore, all the
             nodes on that list which are showing man pages have their
             contents member pointing into the blue.  Undo that harm.  */
-         if (old_contents && oldsize && old_contents != file_buffer->contents)
+         if (old_contents && oldsize && old_contents != file_buffer->contents
+             && info_windows)
            {
              int iw;
              INFO_WINDOW *info_win;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]