mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-01-08 01:20:02 +01:00
Use lzo1x decompress safe to cope with corrupt archives.
This commit is contained in:
parent
a80c0b5e20
commit
e74a11c21b
2
stream.c
2
stream.c
|
|
@ -586,7 +586,7 @@ static int lzo_decompress_buf(rzip_control *control __UNUSED__, struct uncomp_th
|
|||
goto out;
|
||||
}
|
||||
|
||||
lzerr = lzo1x_decompress((uchar*)c_buf, ucthread->c_len, (uchar*)ucthread->s_buf, &dlen, NULL);
|
||||
lzerr = lzo1x_decompress_safe((uchar*)c_buf, ucthread->c_len, (uchar*)ucthread->s_buf, &dlen, NULL);
|
||||
if (unlikely(lzerr != LZO_E_OK)) {
|
||||
print_err("Failed to decompress buffer - lzerr=%d\n", lzerr);
|
||||
ret = -1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue