* resolv/res_debug.c: Likewise.
This commit is contained in:
Ulrich Drepper 1998-09-07 15:06:36 +00:00
parent 94b78bb204
commit 3121cc0437
2 changed files with 3 additions and 1 deletions

View File

@ -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>

View File

@ -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);
}