]> git.ipfire.org Git - thirdparty/tar.git/commitdiff
Reject pax options starting with equals sign
authorSergey Poznyakoff <gray@gnu.org>
Fri, 21 Dec 2018 05:32:47 +0000 (07:32 +0200)
committerSergey Poznyakoff <gray@gnu.org>
Fri, 21 Dec 2018 11:54:11 +0000 (13:54 +0200)
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 =

src/xheader.c

index 980f0504e713aa64cd9a42f849681b249240ea88..e93850220d7b340d37101f72c8ad535a36995766 100644 (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--;