aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/simple/simple_private.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-07-10 11:39:38 +0300
committerLasse Collin <lasse.collin@tukaani.org>2009-07-10 11:39:38 +0300
commitcd69a5a6c16c289f6f8e2823b03c72289472270f (patch)
treea7c807f5c1a2e6d3ce345e6fbc6dab17430e9dc0 /src/liblzma/simple/simple_private.h
parentLook for full command names instead of substrings (diff)
downloadxz-cd69a5a6c16c289f6f8e2823b03c72289472270f.tar.xz
BCJ filters: Reject invalid start offsets with LZMA_OPTIONS_ERROR.
This is a quick and slightly dirty fix to make the code conform to the latest file format specification. Without this patch, it's possible to make corrupt files by specifying start offset that is not a multiple of the filter's alignment. Custom start offset is almost never used, so this was only a minor bug. The xz command line tool doesn't validate the start offset, so one will get a bit unclear error message if trying to use an invalid start offset.
Diffstat (limited to 'src/liblzma/simple/simple_private.h')
-rw-r--r--src/liblzma/simple/simple_private.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/liblzma/simple/simple_private.h b/src/liblzma/simple/simple_private.h
index 7571ae21..a69f8278 100644
--- a/src/liblzma/simple/simple_private.h
+++ b/src/liblzma/simple/simple_private.h
@@ -70,6 +70,7 @@ extern lzma_ret lzma_simple_coder_init(lzma_next_coder *next,
lzma_allocator *allocator, const lzma_filter_info *filters,
size_t (*filter)(lzma_simple *simple, uint32_t now_pos,
bool is_encoder, uint8_t *buffer, size_t size),
- size_t simple_size, size_t unfiltered_max, bool is_encoder);
+ size_t simple_size, size_t unfiltered_max,
+ uint32_t alignment, bool is_encoder);
#endif