httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45444] overlapping memcpy in ssl_io_input_read
Date Wed, 06 Aug 2008 12:57:40 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45444





--- Comment #3 from Joe Orton <jorton@redhat.com>  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: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message