diff common-algo.c @ 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 0cdbc95bb3d2
children f9b5dc0cba61
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;
 }