mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 00:38:14 +01:00
Fix std/png decode_other_chunk skipping chunks
This commit is contained in:
1 parent
2373340f83
commit
9c3d27fb43
2 files changed
+6
-2
No files matched your search
@@ -495,8 +495,9 @@ pri func decoder.decode_other_chunk?(src: base.io_reader) {
|
||||
}
|
||||
this.decode_trns?(src: args.src)
|
||||
this.seen_trns = true
|
||||
}
|
||||
|
||||
} else {
|
||||
if this.metadata_fourcc == 0 {
|
||||
args.src.skip?(n: this.chunk_length)
|
||||
}
|
||||
}
|
||||
@@ -591,6 +592,7 @@ pri func decoder.decode_plte?(src: base.io_reader) {
|
||||
return "#bad chunk"
|
||||
}
|
||||
num_entries = (this.chunk_length as base.u32) / 3
|
||||
this.chunk_length = 0
|
||||
|
||||
while i < num_entries {
|
||||
assert i < 256 via "a < b: a < c; c <= b"(c: num_entries)
|
||||
|
||||
Reference in new issue
Block a user