[Xfce4-commits] <xfce4-cpugraph-plugin:master> Fix buffer overflow when constructing options dialog (bug #7247)
Landry Breuil
noreply at xfce.org
Wed Apr 18 23:30:02 CEST 2012
Updating branch refs/heads/master
to 961f109619d37ecbc95c64724f879369b5d2933e (commit)
from a20a581ed444179af75389a5b44882c4c68ecb5b (commit)
commit 961f109619d37ecbc95c64724f879369b5d2933e
Author: Landry Breuil <landry at rhaalovely.net>
Date: Wed Apr 18 23:04:46 2012 +0200
Fix buffer overflow when constructing options dialog (bug #7247)
panel-plugin/properties.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/panel-plugin/properties.c b/panel-plugin/properties.c
index ed191dd..257bdda 100644
--- a/panel-plugin/properties.c
+++ b/panel-plugin/properties.c
@@ -208,8 +208,7 @@ static void setup_tracked_core_option( GtkBox *vbox, GtkSizeGroup *sg, CPUGraph
items[0] = _("All");
for( i = 1; i < nb_items; i++ )
{
- items[i] = g_malloc( g_snprintf( NULL, 0, "%u", i ) );
- g_sprintf( items[i], "%u", i );
+ items[i] = g_strdup_printf( "%u", i );
}
create_drop_down( vbox, sg, _("Tracked Core:"), (const gchar **)items, nb_items, base->tracked_core, change_core, base);
for( i = 1; i < nb_items; i++ )
More information about the Xfce4-commits
mailing list