mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 04:21:13 +00:00
Fix for: https://bugs.chromium.org/p/chromium/issues/detail?id=834710 Before, the verifier would create pointers to objects, and then verify they are inside the buffer. But since even constructing pointers that are outside a valid allocation is Undefinied Behavior in C++, this can trigger UBSAN (with -fsanitize=pointer-overflow). Now instead the bounds checking is first performed using offsets before pointers are even created. Change-Id: If4d376e90df9847e543247e70a062671914dae1b Tested: on Linux.
27 KiB
27 KiB