]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
-C '' is meaningless; complain and die if we are given it.
authorColin Percival <cperciva@daemonology.net>
Tue, 16 Aug 2011 05:23:49 +0000 (01:23 -0400)
committerColin Percival <cperciva@daemonology.net>
Tue, 16 Aug 2011 05:23:49 +0000 (01:23 -0400)
Via: Tarsnap

SVN-Revision: 3621

tar/bsdtar.c

index d508e775235fc5b6a1fe76ea03f9f4773b77b36d..6576b2f08fad39854ff0b7e64bfd1614d6fb0f9a 100644 (file)
@@ -266,6 +266,10 @@ main(int argc, char **argv)
                        bsdtar->bytes_in_last_block = bsdtar->bytes_per_block;
                        break;
                case 'C': /* GNU tar */
+                       if (strlen(bsdtar->argument) == 0)
+                               lafe_errc(1, 0,
+                                   "Meaningless option: -C ''");
+
                        set_chdir(bsdtar, bsdtar->argument);
                        break;
                case 'c': /* SUSv2 */