[uClibc-cvs] uClibc/libc/inet resolv.c,1.42,1.43
Erik Andersen
andersen at codepoet.org
Fri Jan 10 06:26:19 UTC 2003
Update of /var/cvs/uClibc/libc/inet
In directory winder:/tmp/cvs-serv7258
Modified Files:
resolv.c
Log Message:
Patch from Jay Kulpinski:
__decode_dotted() does not count the null terminating byte of
a hostname in the DNS response. This causes lookups to fail
if the DNS response doesn't compress domain names in the
message.
Index: resolv.c
===================================================================
RCS file: /var/cvs/uClibc/libc/inet/resolv.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- resolv.c 21 Nov 2002 07:03:25 -0000 1.42
+++ resolv.c 10 Jan 2003 06:26:14 -0000 1.43
@@ -50,6 +50,11 @@
* allocation accordingly. See MAX_ALIASES and ALIAS_DIM below.
* This fixes the segfault in the Python 2.2.1 socket test.
*
+ * 04-Jan-2003 Jay Kulpinski <jskulpin at berkshire.rr.com>
+ * Fixed __decode_dotted to count the terminating null character
+ * in a host name.
+ *
+ *
*/
#define __FORCE_GLIBC
@@ -305,6 +310,11 @@
dest[used++] = '.';
else
dest[used++] = '\0';
+ }
+
+ /* The null byte must be counted too */
+ if (measure) {
+ total++;
}
DPRINTF("Total decode len = %d\n", total);
More information about the uClibc-cvs
mailing list