From: Connor Behan Date: Mon, 27 Jan 2014 12:42:09 +0000 (+0200) Subject: Detect tarbombs while extracting X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;ds=inline;h=2af87fa2776c8125a587a9b0c2c4fae3bf921ff7;hp=2af87fa2776c8125a587a9b0c2c4fae3bf921ff7;p=chaz%2Ftar Detect tarbombs while extracting * src/common.h (one_top_level_option): New global. (one_top_level): New global. * src/extract.c (extr_init): If one_top_level_option is set, determine the name one_top_level that might have to be prepended. (extract_archive): If one_top_level_option is set, prepend one_top_level to all names that don't already start with it. * src/tar.c (ONE_TOP_LEVEL_OPTION): New contant. (options): New option --one-top-level. (parse_opt): Handle this option. (decode_options): Make it conflict with --absolute-names. ---