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

Bug #1201330 reported by Hans Joachim Desserud
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
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

Revision history for this message
Hans Joachim Desserud (hjd) wrote :
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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