diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2008-12-01 23:04:12 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2008-12-01 23:04:12 +0200 |
commit | ef7890d56453dca1aeb2e12db29b7e418d93dde4 (patch) | |
tree | 657f683d40498285f1f7b1d2ba11076919e2e4eb /src/xz | |
parent | Validate the filter chain before checking filter-specific (diff) | |
download | xz-ef7890d56453dca1aeb2e12db29b7e418d93dde4.tar.xz |
In command line tool, take advantage of memusage calculation's
ability to also validate the filter chain and options (not
implemented yet for all filters).
Diffstat (limited to 'src/xz')
-rw-r--r-- | src/xz/process.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xz/process.c b/src/xz/process.c index b07209b5..4a028751 100644 --- a/src/xz/process.c +++ b/src/xz/process.c @@ -119,9 +119,9 @@ coder_set_compression_settings(void) message_fatal(_("With --format=lzma only the LZMA1 filter " "is supported")); - // TODO: liblzma probably needs an API to validate the filter chain. - - // If using --format=raw, we can be decoding. + // If using --format=raw, we can be decoding. The memusage function + // also validates the filter chain and the options used for the + // filters. uint64_t memory_usage; uint64_t memory_limit; if (opt_mode == MODE_COMPRESS) { @@ -133,7 +133,7 @@ coder_set_compression_settings(void) } if (memory_usage == UINT64_MAX) - message_bug(); + message_fatal("Unsupported filter chain or filter options"); if (preset_default) { // When no preset was explicitly requested, we use the default |