-
Notifications
You must be signed in to change notification settings - Fork 934
[wip] Enforce flatbuffer verification #18824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,7 +58,7 @@ class Program final { | |
| */ | ||
| Minimal, | ||
| /** | ||
| * When ET_ENABLE_PROGRAM_VERIFICATION is enabled, | ||
| * When ET_ENABLE_PROGRAM_VERIFICATION is enabled (the default), | ||
| * Do full verification of the data, ensuring that internal pointers are | ||
| * self-consistent and that the data has not been truncated or obviously | ||
| * corrupted. May not catch all types of corruption, but should guard | ||
|
|
@@ -86,12 +86,12 @@ class Program final { | |
| */ | ||
| ET_NODISCARD static Result<Program> load( | ||
| DataLoader* loader, | ||
| Verification verification = Verification::Minimal); | ||
| Verification verification = Verification::InternalConsistency); | ||
|
|
||
|
Comment on lines
87
to
90
|
||
| /// DEPRECATED: Use the lowercase `load()` instead. | ||
| ET_DEPRECATED ET_NODISCARD static Result<Program> Load( | ||
| DataLoader* loader, | ||
| Verification verification = Verification::Minimal) { | ||
| Verification verification = Verification::InternalConsistency) { | ||
| return load(loader, verification); | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error text says "use Verification::Minimal to skip verification", but Minimal still performs basic checks (e.g., root table offset bounds check below). Consider rewording to avoid implying verification is entirely skipped (e.g., "use Verification::Minimal for basic verification" / "reduced verification").