From d78770c1e5df8a95ba9f5f31f7d1489c2cde7abd Mon Sep 17 00:00:00 2001 From: John Safranek Date: Mon, 22 Oct 2012 14:48:27 -0700 Subject: [PATCH] change null cipher to allow different buffers --- src/internal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/internal.c b/src/internal.c index 4c20bf6bf..56150f655 100644 --- a/src/internal.c +++ b/src/internal.c @@ -2807,6 +2807,9 @@ static INLINE int Encrypt(CYASSL* ssl, byte* out, const byte* input, word32 sz) #ifdef HAVE_NULL_CIPHER case cipher_null: + if (input != out) { + XMEMMOVE(out, input, sz); + } break; #endif @@ -2890,6 +2893,9 @@ static INLINE int Decrypt(CYASSL* ssl, byte* plain, const byte* input, #ifdef HAVE_NULL_CIPHER case cipher_null: + if (input != plain) { + XMEMMOVE(plain, input, sz); + } break; #endif