BOFH: Servers Under Siege segfaults after 2min Uzi firing

Bug #1497735 reported by Sebastian Parschauer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GetDeb Software Portal
Fix Released
Medium
Christoph Korn

Bug Description

While shooting continuously with the Uzi with unlimited ammo (e.g. in Practice mode), the game segfaults suddenly. It takes around 2min until that happens. The reason is that shells and bazooka remainings are remaining actors and MAX_ACTOR (2048) is reached. In that moment spawnactor() from src/actor.c returns NULL but in the ricochet handling in movebullet() the NULL check is missing (line 2553). So it segfaults there.

Affects: all versions so far
Tested with: 0.0.0.0+20110602-1~getdeb1
Tested on: Ubuntu 14.04 64-bit

With the missing NULL check it doesn't segfault any more but all weapons become ineffective if reaching MAX_ACTOR as there is no freeing of shells or bazooka remainings. So the oldest shells and bazooka remainings have to be freed when reaching that point.
I've developed the fix within a GitHub pull request which got merged but it is in review at the moment. Having more reviewers/testers and putting the final fix into a new Debian package would be great.

Upstream bug: https://github.com/neuromancer/BOFH/issues/2
Upstream pull request: https://github.com/neuromancer/BOFH/pull/3

Tags: bofh oom segfault
Revision history for this message
Christoph Korn (c-korn) wrote :

Taking bofh 0.0.0.0+20110602-1~getdeb1 as starting point.

Changed in getdeb.net:
assignee: nobody → Christoph Korn (c-korn)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Christoph Korn (c-korn) wrote :

Published.

Thanks.

---------------
bofh (0.0.0.0+20150920-1~getdeb1) trusty; urgency=medium

  * Bug fixes (LP: #1497735)

 -- Christoph Korn <email address hidden> Sun, 20 Sep 2015 16:15:57 +0200

Changed in getdeb.net:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.