mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 16:32:11 +01:00
Reject "x as T" if x can overflow T.
This commit is contained in:
1 parent
587bc2a55d
commit
8cd43d2c3c
2 files changed
+7
-7
No files matched your search
@@ -44,6 +44,7 @@ pub func lzw_decoder.decode?(dst ptr buf1, src ptr buf1, src_final bool)() {
|
||||
n_bits -= width
|
||||
|
||||
if code < clear_code {
|
||||
assert code < 256 via "a < b: a < c; c <= b"(c:clear_code)
|
||||
in.dst.write_u8?(x:code as u8)
|
||||
if use_save_code {
|
||||
this.suffixes[save_code] = code as u8
|
||||
|
||||
Reference in new issue
Block a user