On Jun 7, 2011, at 4:03 AM, Nick Mathewson wrote:
On Mon, Jun 6, 2011 at 8:37 PM, Nir Soffer <nirsof@xxxxxxxxx> wrote: Here's another patch that might make stuff work. Before I'd apply it, I'd like to have a look through everything that's using evbuffer_ptr_set() and evbuffer_ptr right now to make sure that nothing will freak out if it gets a pointer like this. What do you think?
There is possible issue in my last patch and the internal evbuffer_ptr_substract (line 2295) - it assume that ptr.pos and ptr._internal.pos_in_chain are linked. If you change position, position in chain also change.
However, if pos is 100 bytes after the buffer length, and pos_in_chain is chain->off , then this code will break with my patch.
evbuffer_ptr_substract is not testable since it is defined static. It should be accessible to the tests.
Looks like my patch is too risky before all the code using evbuffer_ptr is tested properly.
*********************************************************************** To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with unsubscribe libevent-users in the body.