Author: ume
Date: Thu Jun 18 16:39:05 2015
New Revision: 284559
URL: https://svnweb.freebsd.org/changeset/base/284559

Log:
  MFC r284229: Add support for '_' occurring at the beginning or
  end of a name component.
  
  PR:           176093
  Submitted by: landonf__at__bikemonkey.org

Modified:
  stable/10/lib/libc/resolv/res_comp.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/resolv/res_comp.c
==============================================================================
--- stable/10/lib/libc/resolv/res_comp.c        Thu Jun 18 16:31:32 2015        
(r284558)
+++ stable/10/lib/libc/resolv/res_comp.c        Thu Jun 18 16:39:05 2015        
(r284559)
@@ -147,12 +147,12 @@ dn_skipname(const u_char *ptr, const u_c
                   || ((c) >= 0x61 && (c) <= 0x7a))
 #define digitchar(c) ((c) >= 0x30 && (c) <= 0x39)
 
-#define borderchar(c) (alphachar(c) || digitchar(c))
 #ifdef RES_ENFORCE_RFC1034
-#define middlechar(c) (borderchar(c) || hyphenchar(c))
+#define borderchar(c) (alphachar(c) || digitchar(c))
 #else
-#define middlechar(c) (borderchar(c) || hyphenchar(c) || underscorechar(c))
+#define borderchar(c) (alphachar(c) || digitchar(c) || underscorechar(c))
 #endif
+#define middlechar(c) (borderchar(c) || hyphenchar(c))
 #define        domainchar(c) ((c) > 0x20 && (c) < 0x7f)
 
 int
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to