1
0
Fork 0

Dave LUFF: Fix buffer overrun with longer runways

This commit is contained in:
mfranz 2009-06-01 10:32:44 +00:00 committed by Tim Moore
parent 4aff7b279d
commit 5a200cb5f4

View file

@ -257,9 +257,8 @@ void GPSPage::OBSPressed() {}
void GPSPage::MsgPressed() {}
string GPSPage::GPSitoa(int n) {
char buf[4];
// TODO - sanity check n!
sprintf(buf, "%i", n);
char buf[6];
snprintf(buf, 6, "%i", n);
string s = buf;
return(s);
}