aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlavio Santes <[email protected]>2016-11-20 18:40:26 -0600
committerFlavio Santes <[email protected]>2016-11-20 23:59:14 -0600
commit20a77d1c76b91a3fbce707a4610767321f64f39c (patch)
treeee25f0d16f2781b2fd5d8d087eea8fbce39ddf88
parent2b473b63017c35236747de4038cde06352ccee7b (diff)
test_ccm_mode: Fix wrong sizeof argument in test_ccm_mode
This commit fixes the wrong sizeof argument error reported by Coverity/Zephyr. Coverity-CID: 152032 Change-Id: Idea4a75edaf9643756a0ee516d39587acb85fee1 Signed-off-by: Flavio Santes <[email protected]>
-rw-r--r--tests/test_ccm_mode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_ccm_mode.c b/tests/test_ccm_mode.c
index 790a88c..5ec72ea 100644
--- a/tests/test_ccm_mode.c
+++ b/tests/test_ccm_mode.c
@@ -331,7 +331,7 @@ void test_vector_8 (void) {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
};
- uint8_t *data = NULL;
+ uint8_t data[] = {};
struct tc_ccm_mode_struct c;
struct tc_aes_key_sched_struct sched;
@@ -346,7 +346,7 @@ void test_vector_8 (void) {
exit (-1);
}
- if (tc_ccm_generation_encryption (ciphertext, hdr, sizeof(hdr), data, 0, &c) == 0) {
+ if (tc_ccm_generation_encryption (ciphertext, hdr, sizeof(hdr), data, sizeof(data), &c) == 0) {
fprintf (stderr, "ccm_encrypt failed\n");
exit (-1);
}