talons

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

commit ad31bc5b69a542274bcf1e23726442caf8ee84b0
parent d6f0b033089779abd24fd45e407d8b88144d1926
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 @@ -1112,6 +1112,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';