diff options
author | Patrick Georgi <pgeorgi@google.com> | 2019-09-20 22:40:13 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-26 15:30:21 +0000 |
commit | e3f424e136249b820be7e6098fbb37f44266cf10 (patch) | |
tree | 9d69db764322561dd6ff339d993964c61bb8e5bb | |
parent | 8a966458f50afb2af475a9cb24fb817ac0383dfb (diff) | |
download | vboot-e3f424e136249b820be7e6098fbb37f44266cf10.tar.gz |
firmware/lib20: Annotate sanitizing function for Coverity
Coverity identifies a couple of issues with data read and then parsed,
but it can't identify that the code checks it. Help coverity with an
annotation.
BUG=none
BRANCH=none
TEST=Should clear a couple of coverity errors, but it's hard to test
offline.
Change-Id: Icab3c6bdfeb4cc36b3c183ac2207c4a41c9cfaf1
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1815242
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
-rw-r--r-- | firmware/lib20/packed_key.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/lib20/packed_key.c b/firmware/lib20/packed_key.c index fc60e8a7..29f924b3 100644 --- a/firmware/lib20/packed_key.c +++ b/firmware/lib20/packed_key.c @@ -59,6 +59,10 @@ vb2_error_t vb2_unpack_key_buffer(struct vb2_public_key *key, key->n = buf32 + 2; key->rr = buf32 + 2 + key->arrsize; +#ifdef __COVERITY__ + __coverity_tainted_data_sanitize__(key); + __coverity_tainted_data_sanitize__(buf); +#endif return VB2_SUCCESS; } |