dawn-cmake/generator/templates/dawn_wire/server
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
..
ServerBase.h Ensure all wire child objects are destroyed before their device 2021-01-13 20:58:18 +00:00
ServerDoers.cpp Add a Reserved state for dawn_wire ObjectId allocations 2021-02-03 23:29:43 +00:00
ServerHandlers.cpp dawn_wire: Harden deserialization routines 2021-02-18 19:28:29 +00:00
ServerPrototypes.inc dawn_wire: Harden deserialization routines 2021-02-18 19:28:29 +00:00