httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 45444] overlapping memcpy in ssl_io_input_read
Date Wed, 06 Aug 2008 12:57:40 GMT

--- Comment #3 from Joe Orton <>  2008-08-06 05:57:40 PST ---
It seems like the code is indeed bogus, for the input getline case:

-> getline the first time
 -> inctx->cbuf is empty
 -> read block from SSL layer into inctx->buffer
 -> pass back first line, stash remainder of inctx->buffer at inctx->cbuf

-> getline the second time
 -> inctx->cbuf non-empty! copy entire inctx->cbuf into inctx->buffer

which results in the overlapping memcpy, and is pretty inefficient to boot; for
N GETLINE calls to read the entire HTTP request, the buffer gets copied over
itself N times.

Changing it to a memmove seems safe enough.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message