[Commits] [wesnoth/wesnoth] e98531: Fix UB in tree_view::remove_node()

GitHub noreply at github.com
Thu Feb 23 17:48:22 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: e98531541de78317e088ecd96d849a57087fd503
      https://github.com/wesnoth/wesnoth/commit/e98531541de78317e088ecd96d849a57087fd503
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2017-02-23 (Thu, 23 Feb 2017)

  Changed paths:
    M src/gui/widgets/tree_view.cpp

  Log Message:
  -----------
  Fix UB in tree_view::remove_node()

The function used a node object after deleting it and an iterator after
invalidating it. Both are undefined behavior.

Thanks to @gfgtdf for spotting the first bug.

Both bugs were introduced in commit 50867795352861762ebe4b42da8e13b0ecb9b3ee.





More information about the Commits mailing list