From: Glenn L McGrath Date: Thu, 20 Nov 2003 09:53:31 +0000 (-0000) Subject: Check at least one context is specified X-Git-Tag: 1_00_pre4~34 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bebc40b4066384288a5db13884162e1e67789d4b;p=oweals%2Fbusybox.git Check at least one context is specified --- diff --git a/archival/tar.c b/archival/tar.c index 9ef616b92..c8a2bd385 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -662,6 +662,9 @@ int tar_main(int argc, char **argv) if(opt & 0x80000000UL) bb_show_usage(); ctx_flag = opt & (CTX_CREATE | CTX_TEST | CTX_EXTRACT); + if (ctx_flag == 0) { + bb_show_usage(); + } if(ctx_flag & CTX_TEST) { if ((tar_handle->action_header == header_list) || (tar_handle->action_header == header_verbose_list)) {