ports/x11/fbpanel/patches/patch-panel_misc_c

15 lines
380 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
use g_snprintf instead of g_sprintf
Index: panel/misc.c
--- panel/misc.c.orig
+++ panel/misc.c
@@ -697,7 +697,7 @@ gchar *
gdk_color_to_RRGGBB(GdkColor *color)
{
static gchar str[10]; // #RRGGBB + \0
- g_sprintf(str, "#%02x%02x%02x",
+ g_snprintf(str, sizeof(str), "#%02x%02x%02x",
color->red >> 8, color->green >> 8, color->blue >> 8);
return str;
}