From 26b0b19d46891d71806c103190cdd895cd873867 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 25 Sep 2012 09:56:37 +0200 Subject: [PATCH] gfio: color parse stack removal Signed-off-by: Jens Axboe --- gfio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfio.c b/gfio.c index d1cf346b..e44a599e 100644 --- a/gfio.c +++ b/gfio.c @@ -1349,13 +1349,13 @@ static void combo_entry_destroy(GtkWidget *widget, gpointer data) static void fill_color_from_rgb(GdkColor *c, gfloat r, gfloat g, gfloat b) { gint R, G, B; - gchar tmp[32]; + gchar tmp[8]; memset(c, 0, sizeof(*c)); R = r * 255; G = g * 255; B = b * 255; - sprintf(tmp, "#%02x%02x%02x", R, G, B); + snprintf(tmp, sizeof(tmp), "#%02x%02x%02x", R, G, B); gdk_color_parse(tmp, c); } -- 2.25.1