Bug:
Create a memory-based bio using:
bio = BIO_new_mem_buf(ptr, length);
Read through the entire contents and try to reset:
BIO_reset(bio);
"bio" is not properly reset because its length is still zero.
Patch:
--- bss_mem.c.orig Sun Feb 20 16:00:39 2000
+++ bss_mem.c Mon May 15 20:43:06 2000
@@ -210,8 +210,10 @@
case BIO_CTRL_RESET:
if (bm->data != NULL) {
/* For read only case reset to the start again */
- if(b->flags & BIO_FLAGS_MEM_RDONLY)
- bm->data -= bm->max - bm->length;
+ if(b->flags & BIO_FLAGS_MEM_RDONLY) {
+ bm->data -= bm->max - bm->length;
+ bm->length = bm->max;
+ }
else {
memset(bm->data,0,bm->max);
bm->length=0;
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]