]> granicus.if.org Git - libevent/commit
Avoid racy bufferevent activation
authorNate Rosenblum <nater@maginatics.com>
Tue, 3 Sep 2013 21:46:47 +0000 (14:46 -0700)
committerNick Mathewson <nickm@torproject.org>
Mon, 9 Sep 2013 15:59:00 +0000 (11:59 -0400)
commit5eb178855a7263a50e38139089720fef7c3a1642
tree4eb4b9fd1ab7bafc5d7752221b23ae8e38b1bc40
parentc83efb801fefe4e10211c1a1d02ecd123926fb8c
Avoid racy bufferevent activation

The evhttp_send_reply method invokes evhttp_write_buffer with a
callback that may release the underlying request object and
bufferevent upon completion. This cleanup callback is invoked by the
underlying bufferevent's write callback. Improperly enabling write
events before referencing the bufferevent could lead to use after free
and memory corruption.
http.c