Commit fbc11e8a authored by Björn Harrtell's avatar Björn Harrtell Committed by Wouter van Oortmerssen

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 :)
parent e9d29c21
......@@ -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_);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment