aboutsummaryrefslogtreecommitdiff
path: root/src/common/mythread.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2017-03-30 18:58:18 +0300
committerLasse Collin <lasse.collin@tukaani.org>2017-03-30 19:10:55 +0300
commitcbc74017939690d13441b8926bb743fb03211b83 (patch)
tree7460d31d2376db046f1ece2067c0da85a13dd88d /src/common/mythread.h
parentUpdate NEWS for 5.2.3. (diff)
downloadxz-cbc74017939690d13441b8926bb743fb03211b83.tar.xz
liblzma: Fix handling of memlimit == 0 in lzma_index_decoder().
It returned LZMA_PROG_ERROR, which was done to avoid zero as the limit (because it's a special value elsewhere), but using LZMA_PROG_ERROR is simply inconvenient and can cause bugs. The fix/workaround is to treat 0 as if it were 1 byte. It's effectively the same thing. The only weird consequence is that then lzma_memlimit_get() will return 1 even when 0 was specified as the limit. This fixes a very rare corner case in xz --list where a specific memory usage limit and a multi-stream file could print the error message "Internal error (bug)" instead of saying that the memory usage limit is too low.
Diffstat (limited to 'src/common/mythread.h')
0 files changed, 0 insertions, 0 deletions