texinfo-commits
[Top][All Lists]
Advanced

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

[6515] info -k malformed dir entry


From: Gavin D. Smith
Subject: [6515] info -k malformed dir entry
Date: Wed, 12 Aug 2015 15:59:06 +0000

Revision: 6515
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6515
Author:   gavin
Date:     2015-08-12 15:59:05 +0000 (Wed, 12 Aug 2015)
Log Message:
-----------
info -k malformed dir entry

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/indices.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2015-08-08 19:32:01 UTC (rev 6514)
+++ trunk/ChangeLog     2015-08-12 15:59:05 UTC (rev 6515)
@@ -1,3 +1,10 @@
+2015-08-12  Gavin Smith  <address@hidden>
+
+       * info/indices.c (apropos_in_all_indices): Check if there is no 
+       filename, to avoid crash with "info -k" when there is a 
+       malformed dir entry.  Crash reported by Ivan Pacheco, and cause 
+       of crash discovered by Sergey Poznyakoff.
+
 2015-08-08  Gavin Smith  <address@hidden>
 
        * doc/texinfo.texi (Indices): Remove unnecessary cross-reference.

Modified: trunk/info/indices.c
===================================================================
--- trunk/info/indices.c        2015-08-08 19:32:01 UTC (rev 6514)
+++ trunk/info/indices.c        2015-08-12 15:59:05 UTC (rev 6515)
@@ -561,12 +561,15 @@
       FILE_BUFFER *this_fb;
 
       this_item = dir_menu[dir_index];
+      if (!this_item->filename)
+        continue;
 
       /* If we already scanned this file, don't do that again.
          In addition to being faster, this also avoids having
          multiple identical entries in the *Apropos* menu.  */
       for (i = 0; i < dir_index; i++)
-        if (FILENAME_CMP (this_item->filename, dir_menu[i]->filename) == 0)
+        if (dir_menu[i]->filename
+            && FILENAME_CMP (this_item->filename, dir_menu[i]->filename) == 0)
           break;
       if (i < dir_index)
         continue;




reply via email to

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