> I can't see the problem here. The check is:
>
> if ((s->s2->wpend_tot > (int)len) || (s->s2->wpend_buf != buf))
sorry, once again i did not check the latest source carefully enough. i
still use 0.8.1 and there the check readed:
if ((s->s2->wpend_tot != (int)len) || (s->s2->wpend_buf != buf)
i sent message to tim with exactly same example long time ago.
> Perhaps you oversimplified your example?
yes. i try again: i have an application which uses non-blocking sockets
and uses something like OpenSSL's BUF class (stuff under crypto/buffer) to
manage output buffers. when i get more data than there is room buffer i
call something like BUF_MEM_grow, which does realloc. now the buf
parameter is not the same, but the contents of the buffer is. if i grow
the buffer between calls to SSL_write i get the error.
well one way to fix my application is to rewrite it so that it will not
reallocate the buffer. it will be probably faster too. but i would like to
have a choice: sometimes i can afford reallocating, sometimes not.
right now this check deserves only one purpose: it disallows me to
reallocate buffers. if we remove this check, everything will still work
and SSL_write will be more like write(2).
arne
btw, the bug appeared only on win95 osr2 machines which have a buggy
select call, which reports that non-blocking sockets are always writable.
so SSL_write gets called very frequently and chances that i reallocted the
output buffer are very high.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]