Silence a dangling-pointer warning in Lzma

This commit is contained in:
pstef 2025-03-19 20:19:39 +00:00
parent f7285ff405
commit 17a05ea939
1 changed files with 2 additions and 1 deletions

3
deps/7zip/LzmaEnc.c vendored
View File

@ -2828,12 +2828,13 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit,
nowPos64 = p->nowPos64;
RangeEnc_Init(&p->rc);
p->rc.outStream = &outStream.vt;
if (desiredPackSize == 0)
return SZ_ERROR_OUTPUT_EOF;
p->rc.outStream = &outStream.vt;
res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize);
p->rc.outStream = NULL;
*unpackSize = (uint32_t)(p->nowPos64 - nowPos64);
*destLen -= outStream.rem;