Thanks for the bug report. I installed the attached patch.
>From 96beaacd7b2c1971c05806c82478db43ad146033 Mon Sep 17 00:00:00 2001 From: Paul Eggert <[email protected]> Date: Tue, 19 May 2020 11:52:01 -0700 Subject: [PATCH] tar: avoid read overrun MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
Problem reported by Timotej Kapus in: https://lists.gnu.org/r/bug-tar/2020-05/msg00001.html * src/transform.c (parse_transform_expr): Diagnose ‘--transform='s'’ instead of continuing past '\0'. --- src/transform.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/transform.c b/src/transform.c index 0a4972a..dea2ecc 100644 --- a/src/transform.c +++ b/src/transform.c @@ -208,6 +208,8 @@ parse_transform_expr (const char *expr) } delim = expr[1]; + if (!delim) + USAGE_ERROR ((0, 0, _("Invalid transform expression"))); /* Scan regular expression */ for (i = 2; expr[i] && expr[i] != delim; i++) -- 2.25.4
