Actions
Bug #3160
closedWrong buffer size in function buffer_substr_replace() in file buffer.c
ASK QUESTIONS IN Forums:
No
Description
In function buffer_substr_replace(), the buffer is inappropriately increased by the buffer_extend() functions.
Previously in version 1.4.59 it was:
buffer_string_set_length(b, blen-len+rlen);
As of version 1.4.60 it is (It's bad):
buffer_extend(b, blen-len+rlen);
The buffer_extend() function increases the buffer (it does not set the size as in the previous function buffer_string_set_length()) and it should be:
buffer_extend(b, rlen-len);
The error occurred when using mod_proxy with the configuration:
proxy.header = ( "map-urlpath" => ( "/proxy/switch/b0:b3:2b:00:e2:6b/" => "/", "/proxy/switch/b0:b3:2b:00:e2:6b" => "/" ) )
Updated by gstrauss over 2 years ago
ick. Thank you for reporting this. Your suggested patch appears correct at first glance.
I need to write some tests to cover this.
Updated by gstrauss over 2 years ago
- Status changed from Patch Pending to Fixed
Applied in changeset 10d5786fe64d18aee2e9ecee7103a7d285c5f34e.
Actions
Also available in: Atom