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.