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

index 646c32624ed7860465360ff83f11c9a93622dfa2..03aff510d7e2ba3a28bf6bce51e1326e8df993f3 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.104.38.1 2011/02/21 07:16:16 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);
 }