commit | 3eb57d69e29fa2775ff5221bca7193ef1806c632 | [log] [tgz] |
---|---|---|
author | Armando Montanez <amontanez@google.com> | Wed Jan 10 00:19:09 2024 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jan 10 00:19:09 2024 +0000 |
tree | 1a9372f8922ac59fd43ef80ecfa3e28dfa099e3e | |
parent | 646551493f985edbb60f07c238c6afda66a44c7d [diff] |
pw_protobuf: Don't crash on invalid field number Previously, if an invalid field number was passed to GetNestedEncoder(), a crash would occur to signal the invalid argument. This pattern didn't match the other methods, which would instead return an error status and put the encoder into an error state. This CL changes the encoder to enter an error state and block writes rather than crashing to match the other methods. Fixes: b/314803709 Change-Id: I56d4b6492d8f8dca376c32a63bffed6e1a887130 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/186724 Reviewed-by: Aaron Green <aarongreen@google.com> Reviewed-by: Alexei Frolov <frolv@google.com> Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Armando Montanez <amontanez@google.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/.