From dafeb495e62f85e08a23a9536ffd3edd8ac1104e Mon Sep 17 00:00:00 2001 From: delphij Date: Fri, 29 May 2009 07:34:54 +0000 Subject: Add an option to enforce strict RFC 1034 compliance. PR: kern/129477 --- lib/libc/resolv/res_comp.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/libc/resolv/res_comp.c b/lib/libc/resolv/res_comp.c index a00755f..81bce5e 100644 --- a/lib/libc/resolv/res_comp.c +++ b/lib/libc/resolv/res_comp.c @@ -148,7 +148,11 @@ dn_skipname(const u_char *ptr, const u_char *eom) { #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)) +#else #define middlechar(c) (borderchar(c) || hyphenchar(c) || underscorechar(c)) +#endif #define domainchar(c) ((c) > 0x20 && (c) < 0x7f) int -- cgit v1.1