Insert a few `mutt_buffer_reset()`s.
Commit
9d6a2418 replaced a lot of `snprintf()`s with `mutt_buffer_printf()`.
Unfortunately, a few of the original lines were relying on `snprintf()`
writing over the beginning of the buffer.
if (mutt_parse_rc_line(hook->command, &token, &err) == -1)
{
mutt_error("%s", err.data);
+ mutt_buffer_reset(&err);
/* The hooks should be independent of each other, so even though this on
* failed, we'll carry on with the others. */
if (mutt_parse_rc_line(hook->command, &token, &err) == -1)
{
mutt_error("%s", err.data);
+ mutt_buffer_reset(&err);
}
}
FREE(&token.data);
if (rc)
{
/* the neomuttrc source keyword */
+ mutt_buffer_reset(err);
mutt_buffer_printf(err, (rc >= -MAXERRS) ? _("source: errors in %s") : _("source: reading aborted due to too many errors in %s"),
rcfile);
rc = -1;
/* get the variable name */
mutt_extract_token(buf, s, MUTT_TOKEN_EQUAL);
+ mutt_buffer_reset(err);
if (mutt_str_strncmp("my_", buf->data, 3) == 0)
myvar = buf->data;
else if ((idx = mutt_option_index(buf->data)) == -1 &&