diff options
Diffstat (limited to 'src/lib/libc/net/res_query.c')
-rw-r--r-- | src/lib/libc/net/res_query.c | 7 |
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 @@ | |||
60 | static char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93"; | 60 | static char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93"; |
61 | static char rcsid[] = "$From: res_query.c,v 8.9 1996/09/22 00:13:28 vixie Exp $"; | 61 | static char rcsid[] = "$From: res_query.c,v 8.9 1996/09/22 00:13:28 vixie Exp $"; |
62 | #else | 62 | #else |
63 | static char rcsid[] = "$OpenBSD: res_query.c,v 1.17 2002/02/16 21:27:23 millert Exp $"; | 63 | static 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 | } |