Removing those memcpy()s also took away the possibility for in and out to
[openssl.git] / crypto / aes / aes_cfb.c
index 9b2917298a8f74cd950c69cd66442440d2ad40ca..9b569dda903e983ae3514fa93099a4ab9d23d639 100644 (file)
  * [including the GNU Public Licence.]
  */
 
+#ifndef AES_DEBUG
+# ifndef NDEBUG
+#  define NDEBUG
+# endif
+#endif
 #include <assert.h>
+
 #include <openssl/aes.h>
 #include "aes_locl.h"
 
@@ -137,7 +143,7 @@ void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
        } else {
                while (l--) {
                        if (n == 0) {
-                               AES_decrypt(ivec, ivec, key);
+                               AES_encrypt(ivec, ivec, key);
                        }
                        c = *(in);
                        *(out++) = *(in++) ^ ivec[n];