quote unknown header keywords in diagnostics

* src/xheader.c (decx): Quote unknown header in warning, as it may
contain control characters.  Problem reported by Wicher Minnaard.
This commit is contained in:
Paul Eggert
2023-09-11 01:17:02 -05:00
parent e1bba5e7dd
commit 9599d193b8
3 changed files with 6 additions and 3 deletions

View File

@@ -692,8 +692,8 @@ decx (void *data, char const *keyword, char const *value, size_t size)
t->decoder (st, keyword, value, size);
else
WARNOPT (WARN_UNKNOWN_KEYWORD,
(0, 0, _("Ignoring unknown extended header keyword '%s'"),
keyword));
(0, 0, _("Ignoring unknown extended header keyword %s"),
quotearg_style (shell_escape_always_quoting_style, keyword)));
}
void