[Bug]: lzma_lzma_preset() returns success if preset is unusable
JiaT75 opened this issue · comments
Describe the bug
If LZMA_MF_HC3
or LZMA_MF_HC4
are disabled for preset level <=3, or if LZMA_MF_BT4
is disabled for the other levels, then lzma_lzma_preset still returns success. When lzma_options_lzma *
is used, it will cause an error.
The solution to this can be done either in code or in documentation. The code change would be simple to check if the needed match finders were configured.
Instead, a documentation change in lzma12.h could make it clear that the preset is valid, but might not work depending on the liblzma configuration (in this case, which match finders were built).
Version
5.5.0alpha
Operating System
N/A
Relevant log output
No response