commit | aff55c94c793ca9de7e157e713198c3eb6a34fa1 | [log] [tgz] |
---|---|---|
author | Tri Vo <trong@google.com> | Sun May 02 17:09:16 2021 -0700 |
committer | Matthew Maurer <mmaurer@google.com> | Tue May 04 17:17:15 2021 +0000 |
tree | e3f6021cd0ff5008733f42e10b54bd3bb933c74c | |
parent | ec26cf896e18a93331ac2934e1c492756c925025 [diff] |
Fix UB when deserializing enums Some things of note: 1. Functions that check the value of enum must be kept in sync with enum definitions, which are in a different project, namely, system/keymaster. 2. Deserializing enums from a buffer can leave the buffer in an inconsistent state if an error is encountered. This should be OK though, since we don't do anything with the buffer after failing deserialization. Bug: 181172066 Change-Id: I87257da8faaaa2d34a39fd35553b16d5b1341cfa