]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
check for snprintf failure
authorMark Andrews <marka@isc.org>
Mon, 21 Feb 2011 07:14:43 +0000 (07:14 +0000)
committerMark Andrews <marka@isc.org>
Mon, 21 Feb 2011 07:14:43 +0000 (07:14 +0000)
bin/named/unix/os.c

index 646c32624ed7860465360ff83f11c9a93622dfa2..6cff2344d19de54e2a612f6228b110046326593f 100644 (file)
@@ -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);
 }