Skip to content

Commit 17a05ea

Browse files
committed
Silence a dangling-pointer warning in Lzma
1 parent f7285ff commit 17a05ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

deps/7zip/LzmaEnc.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -2828,12 +2828,13 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit,
28282828

28292829
nowPos64 = p->nowPos64;
28302830
RangeEnc_Init(&p->rc);
2831-
p->rc.outStream = &outStream.vt;
28322831

28332832
if (desiredPackSize == 0)
28342833
return SZ_ERROR_OUTPUT_EOF;
28352834

2835+
p->rc.outStream = &outStream.vt;
28362836
res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize);
2837+
p->rc.outStream = NULL;
28372838

28382839
*unpackSize = (uint32_t)(p->nowPos64 - nowPos64);
28392840
*destLen -= outStream.rem;

0 commit comments

Comments
 (0)