summaryrefslogtreecommitdiffstats
path: root/package/libkcapi/0001-Have-sufficient-memory-size-for-message.patch
blob: 39e683f58abb82dbed3d603ca78eeb43b7b5e068 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From b56deda7c13c257050fdbdd71c1a5a47b78aa63e Mon Sep 17 00:00:00 2001
From: Stephan Mueller <smueller@chronox.de>
Date: Thu, 3 Aug 2017 17:50:51 +0200
Subject: [PATCH] Have sufficient memory size for message

With GCC 7, the size of the buffer in snprintf is checked. The
occurrence here is found to be too small.

Signed-off-by: Stephan Mueller <smueller@chronox.de>
[Upstream commit: https://github.com/smuellerDD/libkcapi/commit/b56deda7c13c257050fdbdd71c1a5a47b78aa63e]
Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
---
 speed-test/cryptoperf-base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/speed-test/cryptoperf-base.c b/speed-test/cryptoperf-base.c
index 8766ca7..07384ae 100644
--- a/speed-test/cryptoperf-base.c
+++ b/speed-test/cryptoperf-base.c
@@ -172,7 +172,7 @@ char *cp_print_status(struct cp_test *test, int raw)
 			(unsigned long)(processed_bytes/totaltime),
 			(unsigned long)ops);
 	} else {
-		#define VALLEN 10
+		#define VALLEN 23
 		char byteseconds[VALLEN + 1];
 
 		memset(byteseconds, 0, sizeof(byteseconds));
-- 
2.7.4

OpenPOWER on IntegriCloud