Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/source/languages/cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,14 +419,15 @@ Each root type will have a verification function generated for it,
e.g. for `Monster`, you can call:

```cpp
bool ok = VerifyMonsterBuffer(Verifier(buf, len));
Verifier verifier(buf, len);
bool ok = VerifyMonsterBuffer(verifier);
```

if `ok` is true, the buffer is safe to read.

Besides untrusted data, this function may be useful to call in debug
mode, as extra insurance against data being corrupted somewhere along
the way.
mode, or when using file or network-received buffers, as extra insurance
against data being corrupted somewhere along the way.

While verifying a buffer isn't "free", it is typically faster than
a full traversal (since any scalar data is not actually touched),
Expand Down