Dangerous variable-length array (VLA) declaration in map_generator.cc

Bug #1201330 reported by Hans Joachim Desserud on 2013-07-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Undecided
Hans Joachim Desserud

Bug Description

Discovered by scan-build. This is quite new, likely introduced with the changes in r6621.

Looks like an assert(m_mapInfo.numPlayers) would silence it, but I don't know whether that is the best way to fix it.

Related branches

Hans Joachim Desserud (hjd) wrote :
SirVer (sirver) wrote :

The assert is the way to go here. This is a false positive.

Changed in widelands:
assignee: nobody → Hans Joachim Desserud (hjd)
milestone: none → build18-rc1
status: New → In Progress
Nasenbaer (nasenbaer) wrote :

Wow... that's how fast a new scan-build error is generated, tracked down and fixed :-D
Thank you Hans-Joachim and Holger!

Fix merged in bzr rev 6627

Changed in widelands:
status: In Progress → Fix Committed
SirVer (sirver) wrote :

Released in build-18 rc1.

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers