Mercurial > dropbear
changeset 543:e12c9225acbd
- Don't memcpy() in place with void_encrypt
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 09 Jun 2009 13:18:52 +0000 |
parents | c9128994a2d6 |
children | 9e51707cd6f2 |
files | common-algo.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/common-algo.c Mon Jun 08 14:53:29 2009 +0000 +++ b/common-algo.c Tue Jun 09 13:18:52 2009 +0000 @@ -31,7 +31,9 @@ static int void_cipher(const unsigned char* in, unsigned char* out, unsigned long len, void *cipher_state) { - memcpy(out, in, len); + if (in != out) { + memmove(out, in, len); + } return CRYPT_OK; }