From: Mark Andrews Date: Tue, 16 Nov 2010 00:47:48 +0000 (+0000) Subject: check for snprintf failure X-Git-Tag: v9.8.0-P1~354 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=f85281de08389f7a17ff098303848812e125ad97;p=thirdparty%2Fbind9.git check for snprintf failure --- diff --git a/bin/named/unix/os.c b/bin/named/unix/os.c index a44d6c1cca8..7ea07fdd8d8 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.101 2009/08/13 07:04:38 marka Exp $ */ +/* $Id: os.c,v 1.102 2010/11/16 00:47:48 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); }