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 =
This commit is contained in:
Sergey Poznyakoff
2018-12-21 07:32:47 +02:00
parent c7c59b57fa
commit 99d415e190

View File

@@ -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--;