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

tiny res.c fix



For those using RESTRICT_HOSTNAMES to get RFC 1034 compliance,
this patch needs to be applied:

--- res.c       2003/10/12 22:56:33     1.21.2.15
+++ res.c       2003/10/20 22:23:08
@@ -1745,7 +1745,11 @@
 #ifdef RESTRICT_HOSTNAMES
        {
                /* basic character set */
-               if (isascii(c) && isalnum(c))
+               if (c >= 'a' && c <= 'z')
+                       continue;
+               if (c >= 'A' && c <= 'Z')
+                       continue;
+               if (c >= '0' && c <= '9')
                        continue;

                /* special case: hyphen */

Unfortunately (or not) we've change too much in 2.11 and did not
catch it when backporting RESTRICT_HOSTNAMES to 2.10.3. The above
is the easiest fix for that issue.

p.

-- 
Beware of he who would deny you access to information, for in his
heart he dreams himself your master.   -- Commissioner Pravin Lal
http://nerdquiz.sgh.waw.pl/  -- polska wersja quizu dla nerdów ;)