summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/cryptodev/sdk_patches/0040-fix-structure-init-in-sha_speed-test.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/cryptodev/sdk_patches/0040-fix-structure-init-in-sha_speed-test.patch')
-rw-r--r--recipes-kernel/cryptodev/sdk_patches/0040-fix-structure-init-in-sha_speed-test.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/recipes-kernel/cryptodev/sdk_patches/0040-fix-structure-init-in-sha_speed-test.patch b/recipes-kernel/cryptodev/sdk_patches/0040-fix-structure-init-in-sha_speed-test.patch
new file mode 100644
index 0000000..053d376
--- /dev/null
+++ b/recipes-kernel/cryptodev/sdk_patches/0040-fix-structure-init-in-sha_speed-test.patch
@@ -0,0 +1,53 @@
1From 3eb9ed52743584949ff9b4844e810333c34a3a1f Mon Sep 17 00:00:00 2001
2From: Cristian Stoica <cristian.stoica@nxp.com>
3Date: Fri, 12 Feb 2016 11:23:41 +0200
4Subject: [PATCH 40/40] fix structure init in sha_speed test
5
6Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
7---
8 tests/sha_speed.c | 8 ++++----
9 1 file changed, 4 insertions(+), 4 deletions(-)
10
11diff --git a/tests/sha_speed.c b/tests/sha_speed.c
12index d731c66..75d0f42 100644
13--- a/tests/sha_speed.c
14+++ b/tests/sha_speed.c
15@@ -257,7 +257,7 @@ int hash_session(struct session_op *sess, int fdc)
16 int test_sha1(struct session_op *sess, int fdc)
17 {
18 fprintf(stderr, "Testing SHA1 Hash: \n");
19- memset(sess, 0, sizeof(sess));
20+ memset(sess, 0, sizeof(struct session_op));
21 sess->mac = CRYPTO_SHA1;
22 return hash_session(sess, fdc);
23 }
24@@ -266,7 +266,7 @@ int test_sha1(struct session_op *sess, int fdc)
25 int test_sha1_ciochash(struct session_op *sess, int fdc)
26 {
27 fprintf(stderr, "Testing SHA1 CIOCHASH: \n");
28- memset(sess, 0, sizeof(sess));
29+ memset(sess, 0, sizeof(struct session_op));
30 sess->mac = CRYPTO_SHA1;
31 return ciochash_session(sess, fdc);
32 }
33@@ -275,7 +275,7 @@ int test_sha1_ciochash(struct session_op *sess, int fdc)
34 int test_sha256(struct session_op *sess, int fdc)
35 {
36 fprintf(stderr, "Testing SHA256 Hash: \n");
37- memset(sess, 0, sizeof(sess));
38+ memset(sess, 0, sizeof(struct session_op));
39 sess->mac = CRYPTO_SHA2_256;
40 return hash_session(sess, fdc);
41 }
42@@ -284,7 +284,7 @@ int test_sha256(struct session_op *sess, int fdc)
43 int test_sha256_ciochash(struct session_op *sess, int fdc)
44 {
45 fprintf(stderr, "Testing SHA256 CIOCHASH: \n");
46- memset(sess, 0, sizeof(sess));
47+ memset(sess, 0, sizeof(struct session_op));
48 sess->mac = CRYPTO_SHA2_256;
49 return ciochash_session(sess, fdc);
50 }
51--
522.7.0
53