Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/libexec/talkd Pull up revision 1.16 (requested by itoju...
details: https://anonhg.NetBSD.org/src/rev/47b1b279a319
branches: netbsd-1-6
changeset: 530268:47b1b279a319
user: grant <grant%NetBSD.org@localhost>
date: Mon Jun 16 12:35:08 2003 +0000
description:
Pull up revision 1.16 (requested by itojun in ticket #1001):
verify strvis() buffer length is enough. make sure string termination before
use. remove extra ntohs() which is not needed. from Charles Blundell
diffstat:
libexec/talkd/talkd.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (35 lines):
diff -r dfa88ed8ebcf -r 47b1b279a319 libexec/talkd/talkd.c
--- a/libexec/talkd/talkd.c Sun Jun 15 13:12:45 2003 +0000
+++ b/libexec/talkd/talkd.c Mon Jun 16 12:35:08 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: talkd.c,v 1.13.2.1 2002/10/02 03:14:24 lukem Exp $ */
+/* $NetBSD: talkd.c,v 1.13.2.2 2003/06/16 12:35:08 grant Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)talkd.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: talkd.c,v 1.13.2.1 2002/10/02 03:14:24 lukem Exp $");
+__RCSID("$NetBSD: talkd.c,v 1.13.2.2 2003/06/16 12:35:08 grant Exp $");
#endif
#endif /* not lint */
@@ -129,13 +129,13 @@
syslog(LOG_WARNING, "recv: %m");
continue;
}
- lastmsgtime = time(0);
- process_request(mp, &response);
-
mp->l_name[sizeof(mp->l_name) - 1] = '\0';
mp->r_name[sizeof(mp->r_name) - 1] = '\0';
mp->r_tty[sizeof(mp->r_tty) - 1] = '\0';
+ lastmsgtime = time(0);
+ process_request(mp, &response);
+
(void)memcpy(&ctl_addr, &mp->ctl_addr, sizeof(ctl_addr));
ctl_addr.sa_family = mp->ctl_addr.sa_family;
ctl_addr.sa_len = sizeof(ctl_addr);
Home |
Main Index |
Thread Index |
Old Index