diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-24 21:22:38 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-24 21:22:38 +0000 |
commit | 614d3b268363cdee32aba3cafe8e123fe69ac75d (patch) | |
tree | 9662f1a62a0bd0d9512daf0fa448d0a7f051956a /lib/libc/net/res_query.c | |
parent | 899eab9f01ad712357176d191d1b6a49639c11e3 (diff) |
try to use strlcpy and snprintf more; ok various
Diffstat (limited to 'lib/libc/net/res_query.c')
-rw-r--r-- | lib/libc/net/res_query.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/net/res_query.c b/lib/libc/net/res_query.c index 24c07491a9a..53837815c38 100644 --- a/lib/libc/net/res_query.c +++ b/lib/libc/net/res_query.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_query.c,v 1.17 2002/02/16 21:27:23 millert Exp $ */ +/* $OpenBSD: res_query.c,v 1.18 2002/05/24 21:22:37 deraadt Exp $ */ /* * ++Copyright++ 1988, 1993 @@ -60,7 +60,7 @@ static char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93"; static char rcsid[] = "$From: res_query.c,v 8.9 1996/09/22 00:13:28 vixie Exp $"; #else -static char rcsid[] = "$OpenBSD: res_query.c,v 1.17 2002/02/16 21:27:23 millert Exp $"; +static char rcsid[] = "$OpenBSD: res_query.c,v 1.18 2002/05/24 21:22:37 deraadt Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -351,7 +351,8 @@ res_querydomain(name, domain, class, type, answer, anslen) } else longname = name; } else - sprintf(nbuf, "%.*s.%.*s", MAXDNAME, name, MAXDNAME, domain); + snprintf(nbuf, sizeof nbuf, "%.*s.%.*s", + MAXDNAME, name, MAXDNAME, domain); return (res_query(longname, class, type, answer, anslen)); } |