diff options
| author | Jacques Vidrine <nectar@FreeBSD.org> | 2002-09-15 16:51:09 +0000 |
|---|---|---|
| committer | Jacques Vidrine <nectar@FreeBSD.org> | 2002-09-15 16:51:09 +0000 |
| commit | 54384cf3b09666a9d10902735fcb3ef9cd6b5faf (patch) | |
| tree | b148cf252878680c37bb7a53070e4d454eed0300 /lib/libc/net/getnetbydns.c | |
| parent | 99d1c26b7d1f22b45bfe5ec1d7adfbb3b4253ad1 (diff) | |
Notes
Diffstat (limited to 'lib/libc/net/getnetbydns.c')
| -rw-r--r-- | lib/libc/net/getnetbydns.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/libc/net/getnetbydns.c b/lib/libc/net/getnetbydns.c index 369bf2b3ad48..fd771f2545a3 100644 --- a/lib/libc/net/getnetbydns.c +++ b/lib/libc/net/getnetbydns.c @@ -263,7 +263,13 @@ _dns_getnetbyaddr(void *rval, void *cb_data, va_list ap) if (anslen < 0) { #ifdef DEBUG if (_res.options & RES_DEBUG) - printf("res_query failed\n"); + printf("res_search failed\n"); +#endif + return NS_UNAVAIL; + } else if (anslen > sizeof(buf)) { +#ifdef DEBUG + if (_res.options & RES_DEBUG) + printf("res_search static buffer too small"); #endif return NS_UNAVAIL; } @@ -303,7 +309,13 @@ _dns_getnetbyname(void *rval, void *cb_data, va_list ap) if (anslen < 0) { #ifdef DEBUG if (_res.options & RES_DEBUG) - printf("res_query failed\n"); + printf("res_search failed\n"); +#endif + return NS_UNAVAIL; + } else if (anslen > sizeof(buf)) { +#ifdef DEBUG + if (_res.options & RES_DEBUG) + printf("res_search static buffer too small"); #endif return NS_UNAVAIL; } |
