replacements (http://www.jhweiss.de/software/snprintf.html)
* Remove remaining sprintf() calls except refclock_ripencc.c (which is
kept out of --enable-all-clocks as a result), upstream libs which use
- sprintf() ony after careful buffer sizing, and ntp_proto.c.
+ sprintf() only after careful buffer sizing.
(4.2.7p149) 2011/04/11 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1881] describe the {+,-,s} characters in configure --help output.
(4.2.7p148) 2011/04/09 Released by Harlan Stenn <stenn@ntp.org>
p_del = t21 - t34;
p_offset = (t21 + t34) / 2.;
if (p_del < 0 || p_del > 1.) {
- sprintf(statstr, "t21 %.6f t34 %.6f", t21, t34);
+ snprintf(statstr, sizeof(statstr),
+ "t21 %.6f t34 %.6f", t21, t34);
report_event(PEVNT_XERR, peer, statstr);
return;
}
peer->aorg = p_xmt;
peer->borg = peer->dst;
if (t34 < 0 || t34 > 1.) {
- sprintf(statstr,
+ snprintf(statstr, sizeof(statstr),
"offset %.6f delay %.6f", t21, t34);
report_event(PEVNT_XERR, peer, statstr);
return;