summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/res_query.c
diff options
context:
space:
mode:
authorderaadt <>2002-05-24 21:22:37 +0000
committerderaadt <>2002-05-24 21:22:37 +0000
commit2be7fb6fb1368b131cd6a8f7ee34d9c11ef25a64 (patch)
tree96f82217a2fd5234ac1e25601237e64983eef146 /src/lib/libc/net/res_query.c
parent4bb76773d7dd0051cb98a137db9aeefb61518f5a (diff)
downloadopenbsd-2be7fb6fb1368b131cd6a8f7ee34d9c11ef25a64.tar.gz
openbsd-2be7fb6fb1368b131cd6a8f7ee34d9c11ef25a64.tar.bz2
openbsd-2be7fb6fb1368b131cd6a8f7ee34d9c11ef25a64.zip
try to use strlcpy and snprintf more; ok various
Diffstat (limited to 'src/lib/libc/net/res_query.c')
-rw-r--r--src/lib/libc/net/res_query.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libc/net/res_query.c b/src/lib/libc/net/res_query.c
index 24c07491a9..53837815c3 100644
--- a/src/lib/libc/net/res_query.c
+++ b/src/lib/libc/net/res_query.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: res_query.c,v 1.17 2002/02/16 21:27:23 millert Exp $ */ 1/* $OpenBSD: res_query.c,v 1.18 2002/05/24 21:22:37 deraadt Exp $ */
2 2
3/* 3/*
4 * ++Copyright++ 1988, 1993 4 * ++Copyright++ 1988, 1993
@@ -60,7 +60,7 @@
60static char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93"; 60static char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93";
61static char rcsid[] = "$From: res_query.c,v 8.9 1996/09/22 00:13:28 vixie Exp $"; 61static char rcsid[] = "$From: res_query.c,v 8.9 1996/09/22 00:13:28 vixie Exp $";
62#else 62#else
63static char rcsid[] = "$OpenBSD: res_query.c,v 1.17 2002/02/16 21:27:23 millert Exp $"; 63static char rcsid[] = "$OpenBSD: res_query.c,v 1.18 2002/05/24 21:22:37 deraadt Exp $";
64#endif 64#endif
65#endif /* LIBC_SCCS and not lint */ 65#endif /* LIBC_SCCS and not lint */
66 66
@@ -351,7 +351,8 @@ res_querydomain(name, domain, class, type, answer, anslen)
351 } else 351 } else
352 longname = name; 352 longname = name;
353 } else 353 } else
354 sprintf(nbuf, "%.*s.%.*s", MAXDNAME, name, MAXDNAME, domain); 354 snprintf(nbuf, sizeof nbuf, "%.*s.%.*s",
355 MAXDNAME, name, MAXDNAME, domain);
355 356
356 return (res_query(longname, class, type, answer, anslen)); 357 return (res_query(longname, class, type, answer, anslen));
357} 358}