Ah, that is a good point.... in the case where we saw
this, the source bio was a bio_s_mem, i.e. a memory
bio, so it was not doing "r" text-mode eol
translation.  In other instances we do use the "r"
mode with file bios, and I guess that might explain
why we never saw it happen in those functions...
although it could also be that we never had a line of
text that was exactly 1022 characters long. :)

In any case, I don't believe that memory bios can be
set to text-mode... can they?

--Peter Lincroft


--- Richard Levitte via RT <[EMAIL PROTECTED]> wrote:
> 
> A couple of questions:
> 
> - which type of source BIO did you use when this
> happened?
> - if it was a text file, was it opened in binary
> mode?
> 
> In case it was a text file opened in binary mode, do
> you get a 
> better behavior if it's opened in text mode?  You
> see, in text 
> mode, CRLF is supposed to be converted to LF, and
> hopefully 
> *before* the length of the buffer is checked...
> 
> [[EMAIL PROTECTED] - Fri Nov 22 10:27:16 2002]:
> 
> > 
> > OS: Windows, but I think it is a cross-platform
> bug.
> > Version: 0.9.6g
> > 
> > In the following function which is called from
> > PKCS7_sign, if the source text contains a line of
> text
> > which is exactly a mutiple of MAX_SMLEN-2
> characters
> > long and has a CRLF line ending, then the gets
> call
> > will return a buffer which ends with just a CR,
> and
> > then on the next call a line that contains just an
> LF,
> > which will result in two CRLF pairs being put into
> the
> > output.
> 
> -- 
> Richard Levitte
> 
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to