KDE/kdeedu/kstars/kstars/satlib

View: New views
1 Messages — Rating Filter:   Alert me  

KDE/kdeedu/kstars/kstars/satlib

by Alexey Khudyakov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
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);
 }
 
 
_______________________________________________
Kstars-devel mailing list
Kstars-devel@...
https://mail.kde.org/mailman/listinfo/kstars-devel