Merge pull request #2649 from stoeckmann/compress_recursion

compress: Prevent call stack overflow
This commit is contained in:
Tim Kientzle authored and GitHub committed 2025-05-29 16:37:44 -07:00
commit cd5c44c5d0
1 file changed
+2 -1
@@ -328,6 +328,7 @@ next_code(struct archive_read_filter *self)
static int debug_buff[1024];
static unsigned debug_index;
again:
code = newcode = getbits(self, state->bits);
if (code < 0)
return (code);
@@ -360,7 +361,7 @@ next_code(struct archive_read_filter *self)
state->section_end_code = (1 << state->bits) - 1;
state->free_ent = 257;
state->oldcode = -1;
return (next_code(self));
goto again;
}
if (code > state->free_ent