On Thu, Apr 11, 2002 at 12:39:59PM +0200, Pavel Tsekov wrote: > Hello, there! :) > > My colleague Nedelcho Stanev and myself have identified what we would > think to be a bug (or a flaw) in the EVP_DecodeUpdate() routine. We > were trying to read base64 encoded data with the base64 BIO which has > the 'next' member pointed to membuf BIO in which we write the encoded > data. So far so good ... Eventually it turned up that some of the data > we pass to the BIO chain is properly decoded while other not - or more > properly would be to say - partially decoded. We tried to debug the > problem and here is what we have found: > > The EVP_DecodeUpdate() routine errnously returns 0 (EOF) if the buffer > passed it, ends with CRLF and EVP_DecodeBlock() has just processed > the data upto the ending CRLF. > > Attached is a patch and a testcase. I tried to follow the coding style > and to make the change not intrusive :) though its a very small change > :) > > Here is how to reproduce: > > 1. Base64 encode a file lets say > 200kb > 2. unix2dos the output > 3. Use the attached testcase to decode the file
I could easily reproduce your problem and solution. I am currently checking in your patch. Thanks, Lutz -- Lutz Jaenicke [EMAIL PROTECTED] http://www.aet.TU-Cottbus.DE/personen/jaenicke/ BTU Cottbus, Allgemeine Elektrotechnik Universitaetsplatz 3-4, D-03044 Cottbus ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]