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() {} void GPSPage::MsgPressed() {}
string GPSPage::GPSitoa(int n) { string GPSPage::GPSitoa(int n) {
char buf[4]; char buf[6];
// TODO - sanity check n! snprintf(buf, 6, "%i", n);
sprintf(buf, "%i", n);
string s = buf; string s = buf;
return(s); return(s);
} }