mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 16:47:28 +01:00
Change gif workbuf_len worst case from 1 to 0
This commit is contained in:
1 parent
555e8eaaa3
commit
3fd6aca365
6 files changed
+13
-23
No files matched your search
@@ -24,10 +24,7 @@ pub status "#bad palette"
|
||||
|
||||
pri status "#internal error: inconsistent ri/wi"
|
||||
|
||||
// TODO: replace the placeholder 1 value with either 0 or 0xFFFF (plus
|
||||
// lzw.decoder_workbuf_len_max_incl_worst_case), depending on whether we'll
|
||||
// need a per-pixel-row workbuf.
|
||||
pub const decoder_workbuf_len_max_incl_worst_case base.u64 = 1
|
||||
pub const decoder_workbuf_len_max_incl_worst_case base.u64 = 0
|
||||
|
||||
// See the spec appendix E "Interlaced Images" on page 29. The first element
|
||||
// represents either that the frame was non-interlaced, or that all interlace
|
||||
|
||||
@@ -957,10 +957,6 @@ pri func decoder.decode_id_part2?(dst: ptr base.pixel_buffer, src: base.io_reade
|
||||
args.src.skip32_fast!(actual: 1, worst_case: 1)
|
||||
}
|
||||
|
||||
if decoder_workbuf_len_max_incl_worst_case > args.workbuf.length() {
|
||||
return base."#bad workbuf length"
|
||||
}
|
||||
|
||||
while.inner true {
|
||||
if (this.compressed_ri > this.compressed_wi) or (this.compressed_wi > 4096) {
|
||||
return "#internal error: inconsistent ri/wi"
|
||||
|
||||
Reference in new issue
Block a user