fixes strncpy & buf size

Origin commit data
------------------
Branch: ni/coolstream
Commit: 7359504dd7
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-08-07 (Tue, 07 Aug 2012)

Origin message was:
------------------
-fixes strncpy & buf size

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2012-08-07 18:51:44 +02:00
parent 35fa9f19d4
commit f748a12ede
15 changed files with 48 additions and 44 deletions

View File

@@ -138,7 +138,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
for(sit = satellitePositions.begin(); sit != satellitePositions.end(); sit++) {
if(!strcmp(sit->second.name.c_str(),scansettings.satNameNoDiseqc)) {
sat.position = sit->first;
strncpy(sat.satName, scansettings.satNameNoDiseqc, 50);
strncpy(sat.satName, scansettings.satNameNoDiseqc, 49);
satList.push_back(sat);
if(sit->second.motor_position)
motorPosition = sit->second.motor_position;
@@ -148,7 +148,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
#endif
/* send satellite list to zapit */
sat.position = CServiceManager::getInstance()->GetSatellitePosition(scansettings.satNameNoDiseqc);
strncpy(sat.satName, scansettings.satNameNoDiseqc, 50);
strncpy(sat.satName, scansettings.satNameNoDiseqc, 49);
satList.push_back(sat);
satellite_map_t & satmap = frontend->getSatellites();