bug-texinfo
[Top][All Lists]
Advanced

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

Re: Using index in help can crash info


From: Sergey Poznyakoff
Subject: Re: Using index in help can crash info
Date: Mon, 30 Aug 2010 19:20:27 +0300

Hi Vitezslav,

> when indexing help page in info (after another index on another page
> was already built), segmentation fault occurs. Steps to reproduce:

Thanks for the report and the patch.  As a side note, the same bug
was also present in function index_entry_exists, several screens below,
so I installed the enclosed patch.

Regards,
Sergey

Index: info/indices.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/info/indices.c,v
retrieving revision 1.12
diff -p -u -r1.12 indices.c
--- info/indices.c      8 Aug 2010 16:59:04 -0000       1.12
+++ info/indices.c      30 Aug 2010 16:12:29 -0000
@@ -194,6 +194,7 @@ do_info_index_search (WINDOW *window, in
      index for, build and remember an index now. */
   fb = file_buffer_of_window (window);
   if (!initial_index_filename ||
+      !fb ||
       (FILENAME_CMP (initial_index_filename, fb->filename) != 0))
     {
       info_free_references (index_index);
@@ -292,8 +293,9 @@ index_entry_exists (WINDOW *window, char
     return 0;
 
   fb = file_buffer_of_window (window);
-  if (!initial_index_filename
-      || (FILENAME_CMP (initial_index_filename, fb->filename) != 0))
+  if (!initial_index_filename ||
+      !fb ||
+      (FILENAME_CMP (initial_index_filename, fb->filename) != 0))
     {
       info_free_references (index_index);
       index_index = info_indices_of_file_buffer (fb);



reply via email to

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