Tests: test_index: Use minimal values to test integer overflow

(cherry picked from commit 612005bbdb)
This commit is contained in:
Lasse Collin 2024-04-27 16:46:01 +03:00
parent 4ae9e708bc
commit 7e8142ff56
1 changed files with 2 additions and 2 deletions

View File

@ -1208,9 +1208,9 @@ test_lzma_index_cat(void)
assert_true(src != NULL); assert_true(src != NULL);
assert_lzma_ret(lzma_index_append(dest, NULL, assert_lzma_ret(lzma_index_append(dest, NULL,
UNPADDED_SIZE_MIN, LZMA_VLI_MAX - 1), LZMA_OK); UNPADDED_SIZE_MIN, (LZMA_VLI_MAX / 2) + 1), LZMA_OK);
assert_lzma_ret(lzma_index_append(src, NULL, assert_lzma_ret(lzma_index_append(src, NULL,
UNPADDED_SIZE_MIN, LZMA_VLI_MAX - 1), LZMA_OK); UNPADDED_SIZE_MIN, (LZMA_VLI_MAX / 2) + 1), LZMA_OK);
assert_lzma_ret(lzma_index_cat(dest, src, NULL), LZMA_DATA_ERROR); assert_lzma_ret(lzma_index_cat(dest, src, NULL), LZMA_DATA_ERROR);
lzma_index_end(dest, NULL); lzma_index_end(dest, NULL);