summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-06-02 06:27:00 +0000
committercharnier <charnier@FreeBSD.org>1997-06-02 06:27:00 +0000
commit9b043dcc94d3954e2fbbcc3b36e35bd6545b6a8d (patch)
treea85ed46e974292362b90045ee1aa13f919f99ea1 /bin
parent0d4c498faf6216542b3668cd4056cca5a41930a6 (diff)
downloadFreeBSD-src-9b043dcc94d3954e2fbbcc3b36e35bd6545b6a8d.zip
FreeBSD-src-9b043dcc94d3954e2fbbcc3b36e35bd6545b6a8d.tar.gz
Off by 1 adjustment.
Diffstat (limited to 'bin')
-rw-r--r--bin/date/netdate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/date/netdate.c b/bin/date/netdate.c
index 4ff5e2b..e52d90e 100644
--- a/bin/date/netdate.c
+++ b/bin/date/netdate.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: netdate.c,v 1.6 1997/02/22 14:02:35 peter Exp $
+ * $Id: netdate.c,v 1.7 1997/03/10 19:49:03 guido Exp $
*/
#ifndef lint
@@ -116,7 +116,7 @@ netsettime(tval)
warn("gethostname");
goto bad;
}
- (void)strncpy(msg.tsp_name, hostname, sizeof(msg.tsp_name));
+ (void)strncpy(msg.tsp_name, hostname, sizeof(msg.tsp_name) - 1);
msg.tsp_name[sizeof(msg.tsp_name) - 1] = '\0';
msg.tsp_seq = htons((u_short)0);
msg.tsp_time.tv_sec = htonl((u_long)tval);
OpenPOWER on IntegriCloud