From: Richard Russon Date: Mon, 10 Dec 2018 14:26:28 +0000 (+0000) Subject: Prevent $charset from having multiple values X-Git-Tag: 2019-10-25~449 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44398fb6a0f3e7fbb9dbc92113fd28544a384b61;p=neomutt Prevent $charset from having multiple values --- diff --git a/init.c b/init.c index fa5cb1ca5..83e1d4aa8 100644 --- a/init.c +++ b/init.c @@ -3702,6 +3702,13 @@ int charset_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, const char *str = (const char *) value; + if ((strcmp(cdef->name, "charset") == 0) && strchr(str, ':')) + { + mutt_buffer_printf(err, + _("'charset' must contain exactly one character set name")); + return CSR_ERR_INVALID; + } + int rc = CSR_SUCCESS; bool strict = (strcmp(cdef->name, "send_charset") == 0); char *q = NULL;