summary refs log tree commit diff
path: root/resolv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-10-26 20:47:33 +0000
committerUlrich Drepper <drepper@redhat.com>2003-10-26 20:47:33 +0000
commit98d2ca3d87a854f163d6989dc8b22aee63588c09 (patch)
treedde0dd9355eb65271998549e8ec64d491df410de /resolv
parent5ae19a502312bac2403f8aaaf743a9e9e6b1fdf2 (diff)
downloadglibc-98d2ca3d87a854f163d6989dc8b22aee63588c09.tar.gz
glibc-98d2ca3d87a854f163d6989dc8b22aee63588c09.tar.xz
glibc-98d2ca3d87a854f163d6989dc8b22aee63588c09.zip
Update.
	* sysdeps/generic/glob.c (glob): Handle GLOB_BRACE and escaping
	correctly.
	* posix/globtest.sh: Add tests for GLOB_BRACE and escaping.
Diffstat (limited to 'resolv')
-rw-r--r--resolv/ns_name.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/resolv/ns_name.c b/resolv/ns_name.c
index a4f066c9e2..b96a1fe8ab 100644
--- a/resolv/ns_name.c
+++ b/resolv/ns_name.c
@@ -195,12 +195,6 @@ ns_name_pton(const char *src, u_char *dst, size_t dstsiz) {
 				   it internally.  */
 				*label = 0x41;
 				label = bp++;
-				/* Another simplification: always assume
-				   128 bit number.  */
-				if (bp + 16 >= eom) {
-					__set_errno (EMSGSIZE);
-					return (-1);
-				}
 				++src;
 				while (isxdigit (*src)) {
 					n = *src > '9' ? *src - 'a' + 10 : *src - '0';
@@ -211,6 +205,10 @@ ns_name_pton(const char *src, u_char *dst, size_t dstsiz) {
 					}
 					n <<= 4;
 					n += *src > '9' ? *src - 'a' + 10 : *src - '0';
+					if (bp + 1 >= eom) {
+						__set_errno (EMSGSIZE);
+						return (-1);
+					}
 					*bp++ = n;
 					++src;
 				}