Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/dist/ntp/ntpd avoid tp from going smaller address than buf.



details:   https://anonhg.NetBSD.org/src/rev/319d86f425cf
branches:  trunk
changeset: 508067:319d86f425cf
user:      itojun <itojun%NetBSD.org@localhost>
date:      Thu Apr 05 13:52:59 2001 +0000

description:
avoid tp from going smaller address than buf.

diffstat:

 dist/ntp/ntpd/ntp_control.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r e6eb8c4a4cd5 -r 319d86f425cf dist/ntp/ntpd/ntp_control.c
--- a/dist/ntp/ntpd/ntp_control.c       Thu Apr 05 13:30:02 2001 +0000
+++ b/dist/ntp/ntpd/ntp_control.c       Thu Apr 05 13:52:59 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntp_control.c,v 1.2 2001/04/05 02:08:01 simonb Exp $   */
+/*     $NetBSD: ntp_control.c,v 1.3 2001/04/05 13:52:59 itojun Exp $   */
 
 /*
  * ntp_control.c - respond to control messages and send async traps
@@ -1831,7 +1831,7 @@
                                        if (cp < reqend)
                                                cp++;
                                        *tp = '\0';
-                                       while (isspace((int)(*(tp-1))))
+                                       while (tp > buf && isspace((int)(*(tp-1))))
                                                *(--tp) = '\0';
                                        reqpt = cp;
                                        *data = buf;



Home | Main Index | Thread Index | Old Index