aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--resolv/res_debug.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 75616b3..e65d507 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,7 @@
* string/strxfrm.c: Likewise.
* argp/argp-help.c: Likewise.
* argp/argp-parse.c: Likewise.
+ * resolv/res_debug.c: Likewise.
1998-09-07 09:58 Ulrich Drepper <drepper@cygnus.com>
diff --git a/resolv/res_debug.c b/resolv/res_debug.c
index 92b8fa1..eadb020 100644
--- a/resolv/res_debug.c
+++ b/resolv/res_debug.c
@@ -452,11 +452,12 @@ __p_fqnname(cp, msg, msglen, name, namelen)
if ((n = dn_expand(msg, cp + msglen, cp, name, namelen)) < 0)
return (NULL);
newlen = strlen (name);
- if (newlen == 0 || name[newlen - 1] != '.')
+ if (newlen == 0 || name[newlen - 1] != '.') {
if (newlen+1 >= namelen) /* Lack space for final dot */
return (NULL);
else
strcpy(name + newlen, ".");
+ }
return (cp + n);
}