diff -ruN eglibc-2.13.orig/debian/patches/any/gethostbyname-allow-hyphen-firstchar.diff eglibc-2.13/debian/patches/any/gethostbyname-allow-hyphen-firstchar.diff --- eglibc-2.13.orig/debian/patches/any/gethostbyname-allow-hyphen-firstchar.diff 1969-12-31 16:00:00.000000000 -0800 +++ eglibc-2.13/debian/patches/any/gethostbyname-allow-hyphen-firstchar.diff 2011-09-02 10:49:34.835036218 -0700 @@ -0,0 +1,40 @@ +2011-09-01 Tyler Szabo + + * resolv/res_comp.c: made res_hnok, which checks domain name validity + for gethostbyname more liberal to allow hyphens and underscores at + the start and end of a label. + +Index: eglibc-2.11.2/resolv/res_comp.c +=================================================================== +--- eglibc-2.11.2.orig/resolv/res_comp.c 2011-08-31 19:25:21.000000000 -0400 ++++ eglibc-2.11.2/resolv/res_comp.c 2011-08-31 19:25:31.000000000 -0400 +@@ -152,25 +152,11 @@ + + int + res_hnok(const char *dn) { +- int ppch = '\0', pch = PERIOD, ch = *dn++; ++ int ch; + +- while (ch != '\0') { +- int nch = *dn++; +- +- if (periodchar(ch)) { +- (void)NULL; +- } else if (periodchar(pch)) { +- if (!borderchar(ch)) +- return (0); +- } else if (periodchar(nch) || nch == '\0') { +- if (!borderchar(ch)) +- return (0); +- } else { +- if (!middlechar(ch)) +- return (0); +- } +- ppch = pch, pch = ch, ch = nch; +- } ++ while ((ch = *dn++) != '\0') ++ if (!(middlechar(ch) || periodchar(ch))) ++ return (0); + return (1); + } + libresolv_hidden_def (res_hnok) diff -ruN eglibc-2.13.orig/debian/patches/series eglibc-2.13/debian/patches/series --- eglibc-2.13.orig/debian/patches/series 2011-09-02 10:54:27.000000000 -0700 +++ eglibc-2.13/debian/patches/series 2011-09-02 10:51:55.699036021 -0700 @@ -167,3 +167,4 @@ any/local-ldconfig-system-dirs.diff any/libc-memmove_chk.diff any/disable-multiarch-memcpy-x86_64.diff +any/gethostbyname-allow-hyphen-firstchar.diff