dawn-cmake/generator/templates/dawn_wire/client
Austin Eng 51db53fa06 dawn_wire: Harden deserialization routines
- Encapsulate deserialize buffer and size into a DeserializeBuffer
   class. This limits the possible operations so we can be sure
   buffer/size are not manually mutated such that we consume more
   bytes than available.

 - Ensure that memberLength (on deserialization) doesn't narrow (or
   widen). Previously, values were always implicitly cast to size_t.

 - Slight optimization that removes "= nullptr" initialization for
   pointers written by DeserializeBuffer::Read. These
   are always written to on success, so we don't need to initialize
   to nullptr.

Bug: dawn:680
Change-Id: I3779a343e85ff90810707148a952c6ba27cf9d22
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41521
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-02-18 19:28:29 +00:00
..
ApiObjects.h Remove storage class specifier for the explicit template specialization 2020-11-20 09:38:56 +00:00
ApiProcs.cpp Nuke the ClientMatches hack for same-device validation 2021-02-05 21:08:44 +00:00
ClientBase.h Track and destroy all child objects on wire client destruction 2020-11-11 19:46:18 +00:00
ClientHandlers.cpp dawn_wire: Harden deserialization routines 2021-02-18 19:28:29 +00:00
ClientPrototypes.inc dawn_wire: Harden deserialization routines 2021-02-18 19:28:29 +00:00