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

INN Commit rra at isc.org
Sat Oct 10 07:58:53 UTC 2009


    Date: Saturday, October 10, 2009 @ 00:58:53
  Author: iulius
Revision: 8657

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

Thanks to Nix for the patch.

Modified:
  branches/2.5/CONTRIBUTORS
  branches/2.5/doc/pod/news.pod
  branches/2.5/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-10 07:55:28 UTC (rev 8656)
+++ CONTRIBUTORS	2009-10-10 07:58:53 UTC (rev 8657)
@@ -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-10 07:55:28 UTC (rev 8656)
+++ doc/pod/news.pod	2009-10-10 07:58:53 UTC (rev 8657)
@@ -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-10 07:55:28 UTC (rev 8656)
+++ innd/art.c	2009-10-10 07:58:53 UTC (rev 8657)
@@ -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