From 99d415e1902c2309a4a3da41b2f08e5719771336 Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <gray@gnu.org>
Date: Fri, 21 Dec 2018 07:32:47 +0200
Subject: [PATCH 34/58] 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 =
---
 src/xheader.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/xheader.c b/src/xheader.c
index 980f050..e938502 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--;
-- 
2.19.1

