Dave LUFF: Fix buffer overrun with longer runways
This commit is contained in:
parent
4aff7b279d
commit
5a200cb5f4
1 changed files with 2 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue