1
0
mirror of https://git.tukaani.org/xz.git synced 2026-10-31 03:14:56 +00:00

liblzma: Silence a compiler warning

Fixes: 5005914f1acf ("liblzma: Index decoder: Reject an obviously-bad Number of Records better")
This commit is contained in:
Lasse Collin 2026-07-20 22:14:05 +03:00
parent 47c44e9008
commit 0352dc7929
No known key found for this signature in database
GPG Key ID: 38EE757D69184620

View File

@ -367,9 +367,11 @@ lzma_index_buffer_decode(lzma_index **i, uint64_t *memlimit,
return LZMA_PROG_ERROR;
// Initialize the decoder.
// in_size64 is to silence gcc -Wtype-limits on 32-bit targets.
lzma_index_coder coder;
const uint64_t in_size64 = in_size;
return_if_error(index_decoder_reset(&coder, allocator, i, *memlimit,
my_min(in_size, LZMA_BACKWARD_SIZE_MAX)));
my_min(in_size64, LZMA_BACKWARD_SIZE_MAX)));
// Store the input start position so that we can restore it in case
// of an error.