INN commit: trunk (lib/messageid.c storage/overdata.c)

INN Commit Russ_Allbery at isc.org
Thu Aug 28 21:48:49 UTC 2008


    Date: Thursday, August 28, 2008 @ 14:48:48
  Author: iulius
Revision: 7984

Fix a bug for correct printable characters.

Modified:
  trunk/lib/messageid.c
  trunk/storage/overdata.c

--------------------+
 lib/messageid.c    |    5 +++--
 storage/overdata.c |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

Modified: lib/messageid.c
===================================================================
--- lib/messageid.c	2008-08-28 19:32:23 UTC (rev 7983)
+++ lib/messageid.c	2008-08-28 21:48:48 UTC (rev 7984)
@@ -5,6 +5,7 @@
 
 #include "config.h"
 #include "clibrary.h"
+#include <ctype.h>
 #include <time.h>
 
 #include "inn/innconf.h"
@@ -76,8 +77,8 @@
             else
                 break;
         }
-        /* Contains only US-ASCII characters. */
-        if (*p < 33 || *p == 127)
+        /* Contains only printable US-ASCII characters. */
+        if (!CTYPE(isgraph, *p))
             return false;
     } 
 

Modified: storage/overdata.c
===================================================================
--- storage/overdata.c	2008-08-28 19:32:23 UTC (rev 7983)
+++ storage/overdata.c	2008-08-28 21:48:48 UTC (rev 7984)
@@ -247,7 +247,7 @@
     p = (const unsigned char *) string;
     if (full) {
         for (; *p != '\0' && *p != ':'; p++)
-            if (*p < 33 || *p == 127)
+            if (!CTYPE(isgraph, *p))
                 return false;
         if (*p != ':')
             return false;



More information about the inn-committers mailing list