]> git.ipfire.org Git - thirdparty/xz.git/commit
liblzma: index_decoder: Fix missing initializations on LZMA_PROG_ERROR
authorLasse Collin <lasse.collin@tukaani.org>
Sat, 27 Apr 2024 11:33:38 +0000 (14:33 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Sat, 27 Apr 2024 11:33:38 +0000 (14:33 +0300)
commit71eed2520e2eecae89bade9dceea16e56cfa2ea0
tree77ee232c1729120c16b5210b5ecacde7ca14ad94
parent0478473953f50716a2bc37b619b1c7dc2682b1ad
liblzma: index_decoder: Fix missing initializations on LZMA_PROG_ERROR

If the arguments to lzma_index_decoder() or lzma_index_buffer_decode()
were such that LZMA_PROG_ERROR was returned, the lzma_index **i
argument wasn't touched even though the API docs say that *i = NULL
is done if an error occurs. This obviously won't be done even now
if i == NULL but otherwise it is best to do it due to the wording
in the API docs.

In practice this matters very little: The problem can occur only
if the functions are called with invalid arguments, that is,
the calling application must already have a bug.
src/liblzma/common/index_decoder.c