]> git.pond.sub.org Git - empserver/commit
Fix seqno mismatch and use-after-free in shp_sweep()
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 28 Jun 2008 13:15:49 +0000 (09:15 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 28 Jun 2008 13:24:32 +0000 (09:24 -0400)
commitb0644e822cd10d93c1168f7b356068fabc02b2bf
tree3fceb85d4e0bb8beace425aa2e40677e777b3879
parent6d38a0493032b3b13adbbcbd07b65663e7368be3
Fix seqno mismatch and use-after-free in shp_sweep()

The code wrote the swept sector after calling shp_check_one_mines().
This failed to use up the mine that hit the minesweeper, and triggered
a seqno mismatch oops.

The code wrote the minesweeper after calling shp_check_one_mines().
This used freed memory when the minesweeper got sunk there.

Broken in 4.0.17.  Fix by moving both calls before
shp_check_one_mines().
src/lib/subs/shpsub.c