[ntp:bk-ntp-dev-send] BitKeeper diffs

Harlan Stenn stenn at deacon.udel.edu
Mon Feb 21 04:12:23 UTC 2011


#### ChangeSet ####
2011-02-20 23:11:05-05:00, stenn at deacon.udel.edu
  refclock_acts.c cleanup from Dave Mills

==== ChangeLog ====
2011-02-20 23:10:57-05:00, stenn at deacon.udel.edu +1 -0
  refclock_acts.c cleanup from Dave Mills

--- 1.804/ChangeLog	2011-02-12 06:07:20 -05:00
+++ 1.805/ChangeLog	2011-02-20 23:10:57 -05:00
@@ -1,3 +1,4 @@
+* refclock_acts.c cleanup from Dave Mills.
 (4.2.7p130) 2011/02/12 Released by Harlan Stenn <stenn at ntp.org>
 * [Bug 1811] Update the download location in WHERE-TO-START.
 (4.2.7p129) 2011/02/09 Released by Harlan Stenn <stenn at ntp.org>

==== ntpd/refclock_acts.c ====
2011-02-20 23:10:57-05:00, stenn at deacon.udel.edu +4 -3
  refclock_acts.c cleanup from Dave Mills

--- 1.46/ntpd/refclock_acts.c	2011-01-22 01:22:23 -05:00
+++ 1.47/ntpd/refclock_acts.c	2011-02-20 23:10:57 -05:00
@@ -165,7 +165,8 @@ extern int async_write(int, const void *
 #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
@@ -381,7 +382,7 @@ acts_message(
 	/*
 	 * Extract the first token in the line.
 	 */
-	strncpy(tbuf, msg, sizeof(tbuf));
+	strncpy(tbuf, msg, sizeof(tbuf) - 1);
 	strtok(tbuf, " ");
 	switch (up->state) {
 
@@ -895,7 +896,7 @@ acts_timecode(
 	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);


More information about the bk-ntp-dev-send mailing list