From e32e9d63c67ab95ef0576154680a6c52334b97af Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Thu, 8 Feb 2018 14:11:23 +0100 Subject: Do not read beyond end of escaped string Credit to OSS-Fuzz --- src/fe-common/core/themes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/fe-common/core') diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c index acb5d1c7..5a817daa 100644 --- a/src/fe-common/core/themes.c +++ b/src/fe-common/core/themes.c @@ -485,7 +485,7 @@ static char *theme_format_expand_abstract(THEME_REC *theme, const char **formatp str = g_string_new(NULL); p = ret; while (*p != '\0') { - if (*p == '\\') { + if (*p == '\\' && p[1] != '\0') { int chr; p++; chr = expand_escape(&p); -- cgit v1.2.3