4
0
Эх сурвалжийг харах

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 =
Sergey Poznyakoff 6 жил өмнө
parent
commit
99d415e190
1 өөрчлөгдсөн 3 нэмэгдсэн , 0 устгасан
  1. 3 0
      src/xheader.c

+ 3 - 0
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--;