From 36991e19096227f5d82f367b611cf94705139203 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Sun, 8 Sep 2024 23:19:05 +1000 Subject: [PATCH] std/qoi: fix restart io_position --- release/c/wuffs-unsupported-snapshot.c | 2 +- std/qoi/decode_qoi.wuffs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/release/c/wuffs-unsupported-snapshot.c b/release/c/wuffs-unsupported-snapshot.c index d9cbee2b..d4bd937f 100644 --- a/release/c/wuffs-unsupported-snapshot.c +++ b/release/c/wuffs-unsupported-snapshot.c @@ -71396,7 +71396,7 @@ wuffs_qoi__decoder__do_decode_frame_config( goto suspend; } } else if (self->private_impl.f_call_sequence == 40u) { - if (16u != wuffs_base__u64__sat_add((a_src ? a_src->meta.pos : 0), ((uint64_t)(iop_a_src - io0_a_src)))) { + if (14u != wuffs_base__u64__sat_add((a_src ? a_src->meta.pos : 0), ((uint64_t)(iop_a_src - io0_a_src)))) { status = wuffs_base__make_status(wuffs_base__error__bad_restart); goto exit; } diff --git a/std/qoi/decode_qoi.wuffs b/std/qoi/decode_qoi.wuffs index afbb4c00..05d263bb 100644 --- a/std/qoi/decode_qoi.wuffs +++ b/std/qoi/decode_qoi.wuffs @@ -124,7 +124,7 @@ pri func decoder.do_decode_frame_config?(dst: nptr base.frame_config, src: base. } else if this.call_sequence < 0x20 { this.do_decode_image_config?(dst: nullptr, src: args.src) } else if this.call_sequence == 0x28 { - if 16 <> args.src.position() { + if 14 <> args.src.position() { return base."#bad restart" } } else if this.call_sequence == 0x40 {