Avoid intentional unsigned integer overflow getting caught by sanitizers (#5572)
* Avoid intentional unsigned integer overflow getting caught by sanitizers * Adapt from suggested compiler compatible solution * And a third way :)
This commit is contained in:
parent
e9d29c21a7
commit
fbc11e8aec
|
@ -2230,6 +2230,7 @@ class Verifier FLATBUFFERS_FINAL_CLASS {
|
|||
return true;
|
||||
}
|
||||
|
||||
__supress_ubsan__("unsigned-integer-overflow")
|
||||
bool VerifyTableStart(const uint8_t *table) {
|
||||
// Check the vtable offset.
|
||||
auto tableo = static_cast<size_t>(table - buf_);
|
||||
|
|
Loading…
Reference in New Issue