Fix std/cbor meta.ri decoding F8XX for small XX

Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24819
This commit is contained in:
Nigel Tao committed 2020-08-12 23:45:44 +10:00
1 parent 2de1dfec97
commit 16fadb25cf
2 files changed
+9

No files matched your search

+5
View File
@@ -17239,6 +17239,11 @@ wuffs_cbor__decoder__decode_tokens(
goto label__goto_parsed_a_leaf_value__break;
} else if (v_c_minor == 24) {
if (v_string_length < 24) {
if ( ! (iop_a_src > io1_a_src)) {
status = wuffs_base__make_status(wuffs_cbor__error__internal_error_inconsistent_i_o);
goto exit;
}
(iop_a_src--, wuffs_base__make_empty_struct());
goto label__goto_fail__break;
}
*iop_a_dst++ = wuffs_base__make_token(
+4
View File
@@ -623,6 +623,10 @@ pub func decoder.decode_tokens?(dst: base.token_writer, src: base.io_reader, wor
} else if c_minor == 0x18 {
if string_length < 0x18 {
if not args.src.can_undo_byte() {
return "#internal error: inconsistent I/O"
}
args.src.undo_byte!()
break.goto_fail
}
args.dst.write_simple_token_fast!(