From a360461b34c8cff31c66ef18d872fc2f04be395b Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 21 Feb 2011 07:14:43 +0000 Subject: [PATCH] check for snprintf failure --- bin/named/unix/os.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/named/unix/os.c b/bin/named/unix/os.c index 646c32624e..6cff2344d1 100644 --- a/bin/named/unix/os.c +++ b/bin/named/unix/os.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: os.c,v 1.104 2010/11/17 23:47:08 tbox Exp $ */ +/* $Id: os.c,v 1.105 2011/02/21 07:14:43 marka Exp $ */ /*! \file */ @@ -950,7 +950,7 @@ ns_os_shutdownmsg(char *command, isc_buffer_t *text) { isc_buffer_availablelength(text), "pid: %ld", (long)pid); /* Only send a message if it is complete. */ - if (n < isc_buffer_availablelength(text)) + if (n > 0 && n < isc_buffer_availablelength(text)) isc_buffer_add(text, n); }