From: Colin Percival Date: Tue, 16 Aug 2011 05:23:49 +0000 (-0400) Subject: -C '' is meaningless; complain and die if we are given it. X-Git-Tag: v3.0.0a~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=600720e418b41f72671db6f70d2d5955e34c4530;p=thirdparty%2Flibarchive.git -C '' is meaningless; complain and die if we are given it. Via: Tarsnap SVN-Revision: 3621 --- diff --git a/tar/bsdtar.c b/tar/bsdtar.c index d508e7752..6576b2f08 100644 --- a/tar/bsdtar.c +++ b/tar/bsdtar.c @@ -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 */