talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 67de7a4db562991a672ea426909f58f5d528d071
parent 5d552a3e4677d8c92bc86d2d95dd84622afbf2c0
Author: paul <paul@claws-mail.org>
Date:   Tue,  2 Mar 2021 09:34:07 +0000

fix debian bug #983778, 'Segfault on selecting empty 'X-Face' custom header'

Diffstat:
Msrc/gtk/gtkutils.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c @@ -1089,6 +1089,9 @@ GtkWidget *xface_get_from_header(const gchar *o_xface) static gchar *xpm_xface[XPM_XFACE_HEIGHT]; static gboolean xpm_xface_init = TRUE; gchar xface[2048]; + + cm_return_if_fail(sizeof(xface) < 0); + strncpy(xface, o_xface, sizeof(xface) - 1); xface[sizeof(xface) - 1] = '\0';