+* refclock_acts.c cleanup from Dave Mills.
(4.2.7p130) 2011/02/12 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1811] Update the download location in WHERE-TO-START.
(4.2.7p129) 2011/02/09 Released by Harlan Stenn <stenn@ntp.org>
#define LF 0x0a /* ASCII LF */
/*
- * Modem setup strings. These may have to be changed for some modems.
+ * Modem setup strings. These may have to be changed for
+ * some modems.
*
* AT command prefix
* B1 US answer tone
/*
* Extract the first token in the line.
*/
- strncpy(tbuf, msg, sizeof(tbuf));
+ strncpy(tbuf, msg, sizeof(tbuf) - 1);
strtok(tbuf, " ");
switch (up->state) {
if (up->msgcnt == 0)
return;
- strncpy(pp->a_lastcode, str, sizeof(pp->a_lastcode));
+ strncpy(pp->a_lastcode, str, sizeof(pp->a_lastcode) - 1);
pp->lencode = strlen(pp->a_lastcode);
if (!refclock_process(pp)) {
refclock_report(peer, CEVNT_BADTIME);