From 2358ef8238f166c49e66f438e7494d4d352eb113 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sat, 27 Apr 2024 16:46:01 +0300 Subject: [PATCH] Tests: test_index: Use minimal values to test integer overflow (cherry picked from commit 612005bbdb0dea9dc09e9e2e9cc16a15c1480acd) --- tests/test_index.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_index.c b/tests/test_index.c index ac3bd98a..b46555a8 100644 --- a/tests/test_index.c +++ b/tests/test_index.c @@ -1208,9 +1208,9 @@ test_lzma_index_cat(void) assert_true(src != 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, - 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); lzma_index_end(dest, NULL);