MantisBT - Zandronum
View Issue Details
0001774Zandronum[All Projects] Bugpublic2014-04-07 08:282018-09-30 21:36
Edward-san 
Torr Samaho 
urgentcrashalways
closedfixed 
Linux
1.2 
1.31.3 
0001774: Buffer overflow crash in release build compiled with GCC 4.8
If zandronum is compiled with GCC 4.8, the release build will crash when trying to run a server. The crash happens in src/parsecontext.cpp, line 160:


strcpy (yylval->sym, token);


It happens because GCC 4.8 makes wrong assumptions regarding unions with char arrays (in the code FParseToken is an union with two char arrays); it was fixed in GCC 4.9 (see PR54570 ).

This bug showed up also in zdoom and was fixed with this commit. Applying the patch on the zandronum code makes the crash go away.
- Compile Zandronum with GCC 4.8
- Run 'zandronum -iwad doom2.wad -host'
No tags attached.
Issue History
2014-04-07 08:28Edward-sanNew Issue
2014-04-07 16:24Edward-sanOS => Linux
2014-04-07 16:24Edward-sanProduct Version => 1.2
2014-04-07 20:54Torr SamahoNote Added: 0008515
2014-04-07 20:54Torr SamahoAssigned To => Torr Samaho
2014-04-07 20:54Torr SamahoStatusnew => needs testing
2014-04-07 22:06DuskView Statusprivate => public
2014-07-20 16:04Edward-sanNote Added: 0010012
2014-07-20 16:04Edward-sanStatusneeds testing => resolved
2014-07-20 16:04Edward-sanFixed in Version => 1.3
2014-07-20 16:04Edward-sanResolutionopen => fixed
2018-09-30 21:36Blzut3Statusresolved => closed

Notes
(0008515)
Torr Samaho   
2014-04-07 20:54   
I already backported the ZDoom fix to 2.0 a while ago and transplanted it to 1.3 now.
(0010012)
Edward-san   
2014-07-20 16:04   
Works fine here.