From: <av...@us...> - 2012-01-08 04:01:51
|
Revision: 3738 http://sc2.svn.sourceforge.net/sc2/?rev=3738&view=rev Author: avolkov Date: 2012-01-08 04:01:44 +0000 (Sun, 08 Jan 2012) Log Message: ----------- fix out of bounds (off by 1) access of vcontrol_parse_state::line Modified Paths: -------------- trunk/sc2/src/libs/input/sdl/vcontrol.c Modified: trunk/sc2/src/libs/input/sdl/vcontrol.c =================================================================== --- trunk/sc2/src/libs/input/sdl/vcontrol.c 2012-01-08 01:12:22 UTC (rev 3737) +++ trunk/sc2/src/libs/input/sdl/vcontrol.c 2012-01-08 04:01:44 UTC (rev 3738) @@ -1265,7 +1265,7 @@ parse_state ps; strncpy (ps.line, spec, LINE_SIZE); - ps.line[LINE_SIZE] = '\0'; + ps.line[LINE_SIZE - 1] = '\0'; ps.index = ps.error = 0; ps.linenum = -1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |