From: Zhaofeng Li Date: Fri, 16 May 2025 17:34:08 +0000 (-0600) Subject: bsdtar: Disallow multiple --files-from/-T options X-Git-Tag: v3.8.0~17^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2607%2Fhead;p=thirdparty%2Flibarchive.git bsdtar: Disallow multiple --files-from/-T options --- 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 */