]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
bsdtar: Disallow multiple --files-from/-T options 2607/head
authorZhaofeng Li <hello@zhaofeng.li>
Fri, 16 May 2025 17:34:08 +0000 (11:34 -0600)
committerZhaofeng Li <hello@zhaofeng.li>
Fri, 16 May 2025 17:35:36 +0000 (11:35 -0600)
tar/bsdtar.c

index a043cd6b75ced3701ae32d4f1de9857316080e7f..53ac135f01296fe028e6ca022a50140774763a43 100644 (file)
@@ -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 */