INN commit: trunk (CONTRIBUTORS doc/pod/news.pod innd/art.c)

INN Commit rra at isc.org
Sat Oct 10 07:48:23 UTC 2009


    Date: Saturday, October 10, 2009 @ 00:48:23
  Author: iulius
Revision: 8653

Fix a segfault in the keyword generation code for articles
already containing a Keywords: header.

Thanks to Nix for the patch.

Modified:
  trunk/CONTRIBUTORS
  trunk/doc/pod/news.pod
  trunk/innd/art.c

------------------+
 CONTRIBUTORS     |    4 ++--
 doc/pod/news.pod |    4 +++-
 innd/art.c       |   12 ++++++------
 3 files changed, 11 insertions(+), 9 deletions(-)

Modified: CONTRIBUTORS
===================================================================
--- CONTRIBUTORS	2009-10-09 16:58:31 UTC (rev 8652)
+++ CONTRIBUTORS	2009-10-10 07:48:23 UTC (rev 8653)
@@ -79,7 +79,7 @@
         configuration file.  Added support for nested profile timers.
 
 Jeremy Nixon:
-        Wrote the initial patch for Perl filtering of message IDs on IHAVE
+        Wrote the initial patch for Perl filtering of message-IDs on IHAVE
         or CHECK and other patches related to the filtering code.
 
 Karl Kleinpaste:
@@ -271,4 +271,4 @@
 David Hlacik, Andreas Mattheiss, James Ralston, Wim Lewis, Johan van Selst,
 Wolfgang M. Weyand, Berend Reitsma, William Kronert, Petr Novopashenniy,
 Steve Crook, John F. Morse, Tim Woodall, Jonathan Kamens, Kamil Jonca,
-S.P. Zeidler
+S.P. Zeidler, Nix

Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod	2009-10-09 16:58:31 UTC (rev 8652)
+++ doc/pod/news.pod	2009-10-10 07:48:23 UTC (rev 8653)
@@ -10,7 +10,9 @@
 =item *
 
 Fixed a segfault in the keyword generation code which was assuming
-that an article was nul-terminated.
+that an article was nul-terminated.  Fixed another segfault in the
+keyword generation code when an article already contained a
+Keywords: header.  Thanks to Nix for the bug reports.
 
 =item *
 

Modified: innd/art.c
===================================================================
--- innd/art.c	2009-10-09 16:58:31 UTC (rev 8652)
+++ innd/art.c	2009-10-10 07:48:23 UTC (rev 8653)
@@ -1878,7 +1878,7 @@
     j = hp - ARTheaders;
 
     /* If requested, generate keywords from the body of the article and patch
-       them into the apparent value of the Keywords header so that they make
+       them into the apparent value of the Keywords: header so that they make
        it into overview. */
     if (DO_KEYWORDS && innconf->keywords) {
       /* Ensure that there are Keywords: to shovel. */
@@ -1939,11 +1939,11 @@
     /* Patch the old keywords back in. */
     if (DO_KEYWORDS && innconf->keywords) {
       if (key_old_value) {
-	if (hc->Value)
-	  free(hc->Value);		/* malloc'd within */
-	hc->Value  = key_old_value;
-	hc->Length = key_old_length;
-	key_old_value = NULL;
+        if (hc[HDR__KEYWORDS].Value)
+          free(hc[HDR__KEYWORDS].Value); /* malloc'd within. */
+        hc[HDR__KEYWORDS].Value  = key_old_value;
+        hc[HDR__KEYWORDS].Length = key_old_length;
+        key_old_value = NULL;
       }
     }
   }




More information about the inn-committers mailing list