mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-29 15:42:00 +00:00
fix: annotated output for size-prefixed binaries (#8976)
This commit is contained in:
@@ -126,9 +126,7 @@ static BinarySection GenerateMissingSection(const uint64_t offset,
|
|||||||
std::map<uint64_t, BinarySection> BinaryAnnotator::Annotate() {
|
std::map<uint64_t, BinarySection> BinaryAnnotator::Annotate() {
|
||||||
if (bfbs_ != nullptr && bfbs_length_ != 0) {
|
if (bfbs_ != nullptr && bfbs_length_ != 0) {
|
||||||
flatbuffers::Verifier verifier(bfbs_, static_cast<size_t>(bfbs_length_));
|
flatbuffers::Verifier verifier(bfbs_, static_cast<size_t>(bfbs_length_));
|
||||||
if ((is_size_prefixed_ &&
|
if (!reflection::VerifySchemaBuffer(verifier)) {
|
||||||
!reflection::VerifySizePrefixedSchemaBuffer(verifier)) ||
|
|
||||||
!reflection::VerifySchemaBuffer(verifier)) {
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user