[Kstars-devel] KDE/kdeedu/kstars/kstars/satlib
Alexey Khudyakov
alexey.skladnoy at gmail.com
Thu Oct 22 13:02:58 CEST 2009
SVN commit 1038950 by khudyakov:
Do not copy ObsName to qth.callsign. Latter has fixed length and if
ObsName string is longer than 16 bytes copying may cause crash.
Initialize qth.callsing to empty string instead. It's not used anywhere
so this is most conservative fix.
CCMAIL: kstars-devel at kde.org
CCBUG: 202212
CCBUG: 201756
M +2 -2 SatLib.c
--- trunk/KDE/kdeedu/kstars/kstars/satlib/SatLib.c #1038949:1038950
@@ -2771,7 +2771,7 @@
antfd=-1;
/* Set up qth */
- sprintf(qth.callsign,"%s",ObsName);
+ qth.callsign[0] = '\0'; /* Set callsing to empty string instead of copying ObsName here. */
qth.stnlat=ObsLat;
qth.stnlong=ObsLong;
qth.stnalt=ObsAlt;
@@ -2781,7 +2781,7 @@
obs_geodetic.theta=0.0;
/* Set up tle */
-return ReadTLE(TLE_file);
+ return ReadTLE(TLE_file);
}
More information about the Kstars-devel
mailing list