1
0
Fork 0

make sure snprintf() buffer is terminated

This commit is contained in:
mfranz 2007-10-27 17:16:00 +00:00
parent 6432d714cc
commit 1c1559f36c

View file

@ -463,6 +463,7 @@ getLongitudeString ()
snprintf(buf, 32, "%d*%02d %04.1f%c", int(d < 0.0 ? -deg : deg),
int(min), fabs(sec), c);
}
buf[31] = '\0';
return buf;
}
@ -491,6 +492,7 @@ getLatitudeString ()
snprintf(buf, 32, "%d*%02d %04.1f%c", int(d < 0.0 ? -deg : deg),
int(min), fabs(sec), c);
}
buf[31] = '\0';
return buf;
}