]> git.ipfire.org Git - thirdparty/xz.git/commit
Tests: test_index: Make it clear that my_alloc() has no integer overflows
authorLasse Collin <lasse.collin@tukaani.org>
Sat, 27 Apr 2024 11:56:16 +0000 (14:56 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Sat, 27 Apr 2024 11:56:16 +0000 (14:56 +0300)
commit7f865577a6224fbbb5f5ca52574b62ea8ac9bf51
tree371a4127e61bebe481ea16588de955399d7ae449
parent12313a3b6596cdcf012e180597f84d231f8730d3
Tests: test_index: Make it clear that my_alloc() has no integer overflows

liblzma guarantees that the product of the allocation size arguments
will fit in size_t.

Putting the pre-increment in the if-statement was clearly wrong
although in practice it didn't matter here as the function is
called only a couple of times.
tests/test_index.c