mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
5b19c9f62b
advance_last_with_data() adjusts evbuffer.last_with_datap, and if we will have empty chain in the middle advance_last_with_data() will stop, while it should not, since while empty chains is not regular thing they can pops up in various places like, and while I did not look through all of them the most tricky I would say is: evbuffer_reverse_space()/evbuffer_commit_space() evbuffer_add_reference() Test case from: https://github.com/envoyproxy/envoy/pull/6062 Fixes: #778 v2: keep last_with_datap really last with data, i.e. update only if chain has data in it