Submitted by: "Noszticzius, Istvan" <inoszticzius@rightnow.com>

Don't clear the output buffer: ciphers should correctly the same input
and output buffers.
This commit is contained in:
Dr. Stephen Henson 2010-02-15 19:02:53 +00:00
parent 68be98d1a6
commit 04a781e844

View File

@ -201,7 +201,6 @@ void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
assert(in && out && key && ivec && num); assert(in && out && key && ivec && num);
assert(*num == 0); assert(*num == 0);
memset(out,0,(length+7)/8);
for(n=0 ; n < length ; ++n) for(n=0 ; n < length ; ++n)
{ {
c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0; c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0;