mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 16:47:28 +01:00
Fix std/png decode_frame workbuf bounds checks
This commit is contained in:
1 parent
3faddde52d
commit
d655f51dae
2 files changed
+3
-3
No files matched your search
@@ -244,8 +244,8 @@ pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader,
|
||||
|
||||
this.workbuf_wi = 0
|
||||
while true {
|
||||
if (this.workbuf_wi >= this.workbuf_length) or (
|
||||
this.workbuf_length >= args.workbuf.length()) {
|
||||
if (this.workbuf_wi > this.workbuf_length) or (
|
||||
this.workbuf_length > args.workbuf.length()) {
|
||||
return base."#bad workbuf length"
|
||||
}
|
||||
io_bind (io: w, data: args.workbuf[this.workbuf_wi .. this.workbuf_length]) {
|
||||
|
||||
Reference in new issue
Block a user