From: Andy Polyakov <appro@openssl.org>
Date: Sun, 8 Jul 2007 19:18:15 +0000 (+0000)
Subject: EVP_*_cfb1 was broken [from HEAD].
X-Git-Tag: OpenSSL_0_9_8f~89
X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4d2a292e8a52a0f2e8c4245ee78fec06eea68003;p=oweals%2Fopenssl.git

EVP_*_cfb1 was broken [from HEAD].
PR: 1318
---

diff --git a/crypto/evp/evp_locl.h b/crypto/evp/evp_locl.h
index 20139d20e4..073b0adcff 100644
--- a/crypto/evp/evp_locl.h
+++ b/crypto/evp/evp_locl.h
@@ -92,7 +92,7 @@ static int cname##_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const uns
 #define BLOCK_CIPHER_func_cfb(cname, cprefix, cbits, kstruct, ksched) \
 static int cname##_cfb##cbits##_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
 {\
-	cprefix##_cfb##cbits##_encrypt(in, out, (long)inl, &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\
+	cprefix##_cfb##cbits##_encrypt(in, out, (long)(cbits==1?inl*8:inl), &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\
 	return 1;\
 }