mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
wrong test to see if snprintf had a too small buffer.
This commit is contained in:
parent
cf300e03de
commit
3acadb07f4
@ -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 <config.h>
|
||||
|
||||
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user