From: <th...@us...> - 2009-01-10 22:45:28
|
Revision: 7262 http://playerstage.svn.sourceforge.net/playerstage/?rev=7262&view=rev Author: thjc Date: 2009-01-10 22:45:21 +0000 (Sat, 10 Jan 2009) Log Message: ----------- fixed unsafe fprintf Modified Paths: -------------- code/player/trunk/server/drivers/shell/writelog.cc Modified: code/player/trunk/server/drivers/shell/writelog.cc =================================================================== --- code/player/trunk/server/drivers/shell/writelog.cc 2009-01-10 22:44:48 UTC (rev 7261) +++ code/player/trunk/server/drivers/shell/writelog.cc 2009-01-10 22:45:21 UTC (rev 7262) @@ -1037,7 +1037,7 @@ scanangle = (player_laser_data_scanangle_t*)data; fprintf(this->file, "%04d %+07.4f %04d ", scanangle->id, scanangle->max_range, scanangle->ranges_count); - + for (i = 0; i < scanangle->ranges_count; i++) { fprintf(this->file, "%.3f ", scanangle->ranges[i]); @@ -1048,7 +1048,7 @@ fprintf(this->file, "%2d ", 0); } return(0); - + default: return(-1); } @@ -2164,7 +2164,7 @@ ::EncodeHex(str, dst_size, camera_data->image, src_size); // Write image bytes - fprintf(this->file, str); + fprintf(this->file, "%s", str); free(str); } if(this->cameraSaveImages) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |