commit | 67506a1a4487c7fb1306bedc391883ec58841522 | [log] [tgz] |
---|---|---|
author | Scott James Remnant <keybuk@google.com> | Mon Mar 21 11:55:35 2022 -0700 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Mar 22 17:19:43 2022 +0000 |
tree | f2e78ea0ba68d7894e0141c98be99494889307d2 | |
parent | dabf915168d2361b45bc354e43859190115bc050 [diff] |
pw_protobuf: Return DataLoss() when reading unknown enum value Consumers reading a typed enum field should be assured that the value read from the wire protocol matches the possible values of the codegen enum type. Validate the read value and return DataLoss() when an unknown value is found on the wire. Change-Id: I25e015c4ed87e1d5f9f2dc5b1c7f90acb2a33455 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/88761 Reviewed-by: Austin Foxley <afoxley@google.com> Pigweed-Auto-Submit: Scott James Remnant <keybuk@google.com> Reviewed-by: Armando Montanez <amontanez@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/