mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-04-09 00:03:55 +00:00
Begin decompressing to stdout via temporary buffer by creating a read/write wrapper.
This commit is contained in:
parent
d9e9f0d71d
commit
4a6fa7602f
4 changed files with 93 additions and 33 deletions
7
stream.c
7
stream.c
|
|
@ -772,9 +772,10 @@ static int seekto(rzip_control *control, struct stream_info *sinfo, i64 pos)
|
|||
if (TMP_OUTBUF) {
|
||||
spos -= control->rel_ofs;
|
||||
control->out_ofs = spos;
|
||||
if (unlikely(spos > control->out_len || spos < 0)) {
|
||||
print_err("Trying to seek to %lld outside tmp outbuf in seekto\n", spos);
|
||||
return -1;
|
||||
if (unlikely((!(DECOMPRESS || TEST_ONLY) && (spos > control->out_len)) ||
|
||||
spos > control->out_maxlen || spos < 0)) {
|
||||
print_err("Trying to seek to %lld outside tmp outbuf in seekto\n", spos);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue