From 0be45a63413c7e51dceae9892b1bb5b2ea690e83 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Fri, 7 Apr 2017 10:54:41 +0200 Subject: [PATCH 1/2] remove unreachable code --- src/stream/chacha/chacha_crypt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/stream/chacha/chacha_crypt.c b/src/stream/chacha/chacha_crypt.c index 59e087a..de42a10 100644 --- a/src/stream/chacha/chacha_crypt.c +++ b/src/stream/chacha/chacha_crypt.c @@ -84,7 +84,6 @@ int chacha_crypt(chacha_state *st, const unsigned char *in, unsigned long inlen, out += 64; in += 64; } - return CRYPT_OK; } #endif From b6c27c2f08e20c8eecaafdd97eee96ec95d9b7c0 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Fri, 7 Apr 2017 11:02:17 +0200 Subject: [PATCH 2/2] no room for nul terminator --- src/stream/chacha/chacha_setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stream/chacha/chacha_setup.c b/src/stream/chacha/chacha_setup.c index 8a20e90..04c43b8 100644 --- a/src/stream/chacha/chacha_setup.c +++ b/src/stream/chacha/chacha_setup.c @@ -16,8 +16,8 @@ #ifdef LTC_CHACHA -static const char sigma[16] = "expand 32-byte k"; -static const char tau[16] = "expand 16-byte k"; +static const char * const sigma = "expand 32-byte k"; +static const char * const tau = "expand 16-byte k"; /** Initialize an ChaCha context (only the key)