INN commit: trunk (doc/pod/news.pod storage/overdata.c)

INN Commit rra at isc.org
Sat Nov 28 21:23:34 UTC 2009


    Date: Saturday, November 28, 2009 @ 13:23:33
  Author: iulius
Revision: 8825

tdx-util was improperly considering empty overview fields
as malformed overview data.

Modified:
  trunk/doc/pod/news.pod
  trunk/storage/overdata.c

--------------------+
 doc/pod/news.pod   |    5 +++++
 storage/overdata.c |    6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod	2009-11-27 20:38:34 UTC (rev 8824)
+++ doc/pod/news.pod	2009-11-28 21:23:33 UTC (rev 8825)
@@ -171,6 +171,11 @@
 
 =item *
 
+Fixed a bug in B<tdx-util> which was not properly parsing empty overview
+fields when called with B<-A> or B<-F>.
+
+=item *
+
 Fixed a bug in B<cvtbatch> which was returning only the size of the
 headers of an article when the C<b> parameter was used with the B<-w>
 flag.  It now correctly returns the size of the whole article, which

Modified: storage/overdata.c
===================================================================
--- storage/overdata.c	2009-11-27 20:38:34 UTC (rev 8824)
+++ storage/overdata.c	2009-11-28 21:23:33 UTC (rev 8825)
@@ -222,6 +222,8 @@
        We also allow high-bit characters, just in case, but not DEL. */
     p = (const unsigned char *) string;
     if (full) {
+        if (*p == '\0' || (*p == '\r' && p[1] == '\n' && p[2] == '\0'))
+            return true;
         for (; *p != '\0' && *p != ':'; p++)
             if (!CTYPE(isgraph, *p))
                 return false;
@@ -232,9 +234,9 @@
             return false;
     }
     for (p++; *p != '\0'; p++) {
-        if (*p == '\015' && p[1] == '\012' && p[2] == '\0')
+        if (*p == '\r' && p[1] == '\n' && p[2] == '\0')
             break;
-        if (*p == '\015' || *p == '\012')
+        if (*p == '\r' || *p == '\n')
             return false;
     }
     return true;




More information about the inn-committers mailing list