dawn-cmake/generator/templates/dawn_wire
Austin Eng 1b31dc0bb2 Add a BufferConsumer primitive for wire [de]serialization
BufferConsumer wraps a buffer pointer and size and exposes a
limited number of operations to get data while decrementing
the remaining available size. This makes it so that code
reading or writing into a buffer cannot easily consume more
bytes than available.

This CL guards against serialization overflows using
BufferConsumer, and it implements GetPtrFromBuffer
(for deserialization) on top of BufferConsumer. A future patch
will make the rest of the deserialization code use BufferConsumer.

Bug: dawn:680
Change-Id: Ic2bd6e7039e83ce70307c2ff47aaca9891c16d91
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41780
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-02-17 22:14:56 +00:00
..
client Nuke the ClientMatches hack for same-device validation 2021-02-05 21:08:44 +00:00
server Add a Reserved state for dawn_wire ObjectId allocations 2021-02-03 23:29:43 +00:00
ObjectType.h Track and destroy all child objects on wire client destruction 2020-11-11 19:46:18 +00:00
WireCmd.cpp Add a BufferConsumer primitive for wire [de]serialization 2021-02-17 22:14:56 +00:00
WireCmd.h Add a BufferConsumer primitive for wire [de]serialization 2021-02-17 22:14:56 +00:00