From: Sergey Poznyakoff Date: Fri, 21 Dec 2018 05:32:47 +0000 (+0200) Subject: Reject pax options starting with equals sign X-Git-Tag: release_1_31~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99d415e1902c2309a4a3da41b2f08e5719771336;p=thirdparty%2Ftar.git Reject pax options starting with equals sign Bug reported in http://lists.gnu.org/archive/html/bug-tar/2018-12/msg00010.html * xheader.c (xheader_set_keyword_equal): Bail out if the keyword starts with = --- diff --git a/src/xheader.c b/src/xheader.c index 980f0504..e9385022 100644 --- a/src/xheader.c +++ b/src/xheader.c @@ -185,6 +185,9 @@ xheader_set_keyword_equal (char *kw, char *eq) bool global = true; char *p = eq; + if (eq == kw) + USAGE_ERROR ((0, 0, _("Malformed pax option: %s"), quote (kw))); + if (eq[-1] == ':') { p--;