diff options
author | Stefan Adolfsson <sadolfsson@chromium.org> | 2018-05-25 14:47:38 +0200 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-08-22 08:16:02 -0700 |
commit | e7bff8f8804e23680ff1fe57062c70debe856d21 (patch) | |
tree | 04fc7efd12b0cc5a129a2957a11dbe66f9dbd802 /include/cec.h | |
parent | e8252556d52f897f2ea443e1cdd1bb0ebf7174ab (diff) | |
download | chrome-ec-e7bff8f8804e23680ff1fe57062c70debe856d21.tar.gz |
CEC: Add unit tests for buffer handling
Makes sure that we don't have and that we don't introduce
buffer overflows in the CEC buffer handling.
Signed-off-by: Stefan Adolfsson <sadolfsson@chromium.org>
BUG=b:80288314
BRANCH=none
TEST=make -j runtests
Change-Id: Iad5f79add99e2582e60f0d11ed53a27ac67e8b8c
Reviewed-on: https://chromium-review.googlesource.com/1073415
Commit-Ready: Stefan Adolfsson <sadolfsson@chromium.org>
Tested-by: Stefan Adolfsson <sadolfsson@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Zhongze Hu <frankhu@google.com>
Diffstat (limited to 'include/cec.h')
-rw-r--r-- | include/cec.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/cec.h b/include/cec.h index d16378917f..f5d7b01ebe 100644 --- a/include/cec.h +++ b/include/cec.h @@ -16,12 +16,12 @@ /* CEC message during transfer */ struct cec_msg_transfer { - /* The CEC message */ - uint8_t buf[MAX_CEC_MSG_LEN]; /* Bit offset */ uint8_t bit; /* Byte offset */ uint8_t byte; + /* The CEC message */ + uint8_t buf[MAX_CEC_MSG_LEN]; }; /* |