comparison libirccd-test/CMakeLists.txt @ 568:ed986ae52656

Common: avoid early deletion of handler When network_stream flushes input/output it destroy the handlers before continuing the block function. This leads in potential use-after-free results because client handlers may capture this as a shared_ptr which is deleted in the `pop_front` call. if (squeue_.front().second) squeue_.front().second(code); squeue_.pop_front(); // ^ ^ ^ Delete handler and possible capture of this sflush(); // ^ ^ ^ Possible use-after-free of `this`
author David Demelier <markand@malikania.fr>
date Tue, 28 Nov 2017 12:20:58 +0100
parents 781e58cf49a0
children 9d4da384f5d6
comparison
equal deleted inserted replaced
567:cf734c969727 568:ed986ae52656