summaryrefslogtreecommitdiff
path: root/include/cec.h
diff options
context:
space:
mode:
authorStefan Adolfsson <sadolfsson@chromium.org>2018-05-25 14:47:38 +0200
committerchrome-bot <chrome-bot@chromium.org>2018-08-22 08:16:02 -0700
commite7bff8f8804e23680ff1fe57062c70debe856d21 (patch)
tree04fc7efd12b0cc5a129a2957a11dbe66f9dbd802 /include/cec.h
parente8252556d52f897f2ea443e1cdd1bb0ebf7174ab (diff)
downloadchrome-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.h4
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];
};
/*