From 6c11ca771b2d805989decf35ed210d4cf0555d0c Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Fri, 21 Aug 2015 21:32:42 +0200 Subject: [PATCH] fix compile error of tests --- src/encauth/ccm/ccm_test.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/encauth/ccm/ccm_test.c b/src/encauth/ccm/ccm_test.c index d3b20e4..55e064e 100644 --- a/src/encauth/ccm/ccm_test.c +++ b/src/encauth/ccm/ccm_test.c @@ -114,7 +114,7 @@ int ccm_test(void) }; unsigned long taglen, x, y; - unsigned char buf[64], buf2[64], tag2[16], tag[16]; + unsigned char buf[64], buf2[64], tag[16], tag2[16], tag3[16]; int err, idx; symmetric_key skey; ccm_state ccm; @@ -188,6 +188,9 @@ int ccm_test(void) } if (y == 0) { + + XMEMCPY(tag3, tests[x].tag, tests[x].taglen); + taglen = tests[x].taglen; if ((err = ccm_memory(idx, tests[x].key, 16, NULL, @@ -195,7 +198,7 @@ int ccm_test(void) tests[x].header, tests[x].headerlen, buf2, tests[x].ptlen, buf, - tests[x].tag, &taglen, 1 )) != CRYPT_OK) { + tag3, &taglen, 1 )) != CRYPT_OK) { return err; } } else {