From 3acadb07f49ffcfc7cdf84607892bd38b8c8f760 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Sat, 1 Dec 2001 00:39:22 +0000 Subject: [PATCH] wrong test to see if snprintf had a too small buffer. --- bin/named/server.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/named/server.c b/bin/named/server.c index 681541e4cc..fc8c9fa8ee 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.365 2001/11/30 01:58:49 gson Exp $ */ +/* $Id: server.c,v 1.366 2001/12/01 00:39:22 marka Exp $ */ #include @@ -2816,7 +2816,7 @@ ns_server_flushname(ns_server_t *server, char *args) { isc_result_t ns_server_status(ns_server_t *server, isc_buffer_t *text) { int zonecount, xferrunning, xferdeferred, soaqueries; - int n; + unsigned int n; zonecount = dns_zonemgr_getcount(server->zonemgr, DNS_ZONESTATE_ANY); xferrunning = dns_zonemgr_getcount(server->zonemgr, @@ -2836,7 +2836,7 @@ ns_server_status(ns_server_t *server, isc_buffer_t *text) { "server is up and running", zonecount, ns_g_debuglevel, xferrunning, xferdeferred, soaqueries, server->log_queries ? "ON" : "OFF"); - if (n < 0) + if (n >= isc_buffer_availablelength(text)) return (ISC_R_NOSPACE); isc_buffer_add(text, n); return (ISC_R_SUCCESS);