diff --git a/protocol/src/protocol_generated_verifier.rs b/protocol/src/protocol_generated_verifier.rs index 4e46b9aeb3..d81db0f697 100644 --- a/protocol/src/protocol_generated_verifier.rs +++ b/protocol/src/protocol_generated_verifier.rs @@ -52,6 +52,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -59,7 +65,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -131,6 +136,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -138,7 +149,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -261,6 +271,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -268,7 +284,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -341,6 +356,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -348,7 +369,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -430,6 +450,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -437,7 +463,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -509,6 +534,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -516,7 +547,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -607,6 +637,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -614,7 +650,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -723,6 +758,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -730,7 +771,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -785,6 +825,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -792,7 +838,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -942,6 +987,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -949,7 +1000,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1052,6 +1102,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1059,7 +1115,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1140,6 +1195,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1147,7 +1208,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1228,6 +1288,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1235,7 +1301,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1307,6 +1372,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1314,7 +1385,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1404,6 +1474,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1411,7 +1487,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1586,6 +1661,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1593,7 +1674,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1666,6 +1746,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1673,7 +1759,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1752,6 +1837,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1759,7 +1850,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1848,6 +1938,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1855,7 +1951,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -1928,6 +2023,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -1935,7 +2036,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2038,6 +2138,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2045,7 +2151,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2136,6 +2241,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2143,7 +2254,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2233,6 +2343,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2240,7 +2356,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2351,6 +2466,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2358,7 +2479,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2422,6 +2542,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2429,7 +2555,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2499,6 +2624,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2506,7 +2637,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2624,6 +2754,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2631,7 +2767,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes) @@ -2733,6 +2868,12 @@ pub mod ckb { let vtab = tab.vtable(); let vtab_num_bytes = vtab.num_bytes(); + let object_inline_num_bytes = vtab.object_inline_num_bytes(); + if vtab_num_bytes < flatbuffers::SIZE_VOFFSET + flatbuffers::SIZE_VOFFSET + || object_inline_num_bytes < flatbuffers::SIZE_SOFFSET + { + return Err(Error::OutOfBounds); + } if vtab_loc .checked_add(vtab_num_bytes) .filter(|loc| *loc <= buf_len) @@ -2740,7 +2881,6 @@ pub mod ckb { { return Err(Error::OutOfBounds); } - let object_inline_num_bytes = vtab.object_inline_num_bytes(); if tab .loc .checked_add(object_inline_num_bytes)