mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-26 17:01:35 +01:00
std/lzma: fix uncompressed prior decoded length
This commit is contained in:
1 parent
4dbea68208
commit
1e5cf45090
3 files changed
+3
-3
No files matched your search
@@ -52469,10 +52469,10 @@ wuffs_lzma__decoder__do_transform_io(
|
|||||||
while (true) {
|
while (true) {
|
||||||
v_n_copied = wuffs_private_impl__io_writer__limited_copy_u32_from_reader(
|
v_n_copied = wuffs_private_impl__io_writer__limited_copy_u32_from_reader(
|
||||||
&iop_a_dst, io2_a_dst,v_length, &iop_a_src, io2_a_src);
|
&iop_a_dst, io2_a_dst,v_length, &iop_a_src, io2_a_src);
|
||||||
|
wuffs_private_impl__u64__sat_add_indirect(&self->private_impl.f_lzma2_prior_decoded_length, ((uint64_t)(v_n_copied)));
|
||||||
if (v_length <= v_n_copied) {
|
if (v_length <= v_n_copied) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
wuffs_private_impl__u64__sat_add_indirect(&self->private_impl.f_lzma2_prior_decoded_length, ((uint64_t)(v_n_copied)));
|
|
||||||
v_length -= v_n_copied;
|
v_length -= v_n_copied;
|
||||||
if (((uint64_t)(io2_a_dst - iop_a_dst)) == 0u) {
|
if (((uint64_t)(io2_a_dst - iop_a_dst)) == 0u) {
|
||||||
status = wuffs_base__make_status(wuffs_base__suspension__short_write);
|
status = wuffs_base__make_status(wuffs_base__suspension__short_write);
|
||||||
|
|||||||
@@ -233,10 +233,10 @@ pri func decoder.do_transform_io?(dst: base.io_writer, src: base.io_reader) {
|
|||||||
|
|
||||||
while true {
|
while true {
|
||||||
n_copied = args.dst.limited_copy_u32_from_reader!(up_to: length, r: args.src)
|
n_copied = args.dst.limited_copy_u32_from_reader!(up_to: length, r: args.src)
|
||||||
|
this.lzma2_prior_decoded_length ~sat+= n_copied as base.u64
|
||||||
if length <= n_copied {
|
if length <= n_copied {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
this.lzma2_prior_decoded_length ~sat+= n_copied as base.u64
|
|
||||||
length -= n_copied
|
length -= n_copied
|
||||||
if args.dst.length() == 0 {
|
if args.dst.length() == 0 {
|
||||||
yield? base."$short write"
|
yield? base."$short write"
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ OK. 15a2a343 test/3pdata/xzsuite/good-1-check-none.xz
|
|||||||
OK. 15a2a343 test/3pdata/xzsuite/good-1-check-sha256.xz
|
OK. 15a2a343 test/3pdata/xzsuite/good-1-check-sha256.xz
|
||||||
OK. db4847fb test/3pdata/xzsuite/good-1-lzma2-1.xz
|
OK. db4847fb test/3pdata/xzsuite/good-1-lzma2-1.xz
|
||||||
OK. db4847fb test/3pdata/xzsuite/good-1-lzma2-2.xz
|
OK. db4847fb test/3pdata/xzsuite/good-1-lzma2-2.xz
|
||||||
BAD cb518f93 test/3pdata/xzsuite/good-1-lzma2-3.xz
|
OK. db4847fb test/3pdata/xzsuite/good-1-lzma2-3.xz
|
||||||
OK. db4847fb test/3pdata/xzsuite/good-1-lzma2-4.xz
|
OK. db4847fb test/3pdata/xzsuite/good-1-lzma2-4.xz
|
||||||
OK. 00000000 test/3pdata/xzsuite/good-1-lzma2-5.xz
|
OK. 00000000 test/3pdata/xzsuite/good-1-lzma2-5.xz
|
||||||
OK. 15a2a343 test/3pdata/xzsuite/good-2-lzma2.xz
|
OK. 15a2a343 test/3pdata/xzsuite/good-2-lzma2.xz
|
||||||
|
|||||||
Reference in new issue
Block a user