[Xfce4-commits] [panel-plugins/xfce4-netload-plugin] 01/01: Fix stringsize - 1 (bug #9172)

noreply at xfce.org noreply at xfce.org
Sun Nov 2 13:26:22 CET 2014


This is an automated email from the git hooks/post-receive script.

mmassonnet pushed a commit to branch master
in repository panel-plugins/xfce4-netload-plugin.

commit f206729df5064f2414a542b37b18079ee3e13fe8
Author: Mike Massonnet <m8t at gandi.net>
Date:   Sun Nov 2 13:26:19 2014 +0100

    Fix stringsize - 1 (bug #9172)
---
 panel-plugin/netload.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/netload.c b/panel-plugin/netload.c
index 95811df..a5f55d9 100644
--- a/panel-plugin/netload.c
+++ b/panel-plugin/netload.c
@@ -238,11 +238,11 @@ static gboolean update_monitors(t_global_monitor *global)
         if (global->monitor->options.show_bars)
             gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(global->monitor->status[i]), temp);
 
-        format_byte_humanreadable( buffer[i], BUFSIZ, display[i], 2 );
-        format_byte_humanreadable( buffer_panel[i], BUFSIZ, display[i], 0 );
+        format_byte_humanreadable( buffer[i], BUFSIZ - 1, display[i], 2 );
+        format_byte_humanreadable( buffer_panel[i], BUFSIZ - 1, display[i], 0 );
     }
     
-    format_byte_humanreadable( buffer[TOT], BUFSIZ, (display[IN]+display[OUT]), 2 );
+    format_byte_humanreadable( buffer[TOT], BUFSIZ - 1, (display[IN]+display[OUT]), 2 );
     
     {
         char* ip = get_ip_address(&(global->monitor->data));

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list