From 00d559e4b9a063575b0e6dab3c2e530276199062 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Fri, 16 May 2025 11:34:08 -0600 Subject: [PATCH] bsdtar: Disallow multiple --files-from/-T options --- tar/bsdtar.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tar/bsdtar.c b/tar/bsdtar.c index a043cd6b7..53ac135f0 100644 --- a/tar/bsdtar.c +++ b/tar/bsdtar.c @@ -755,6 +755,8 @@ main(int argc, char **argv) bsdtar->strip_components = (int)l; break; case 'T': /* GNU tar */ + if (bsdtar->names_from_file) + lafe_errc(1, 0, "Multiple --files-from/-T options are not supported"); bsdtar->names_from_file = bsdtar->argument; break; case 't': /* SUSv2 */ -- 2.47.2