1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00
* 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

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