Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/ntp/dist/ntpd avoid an overflow condition.
details: https://anonhg.NetBSD.org/src/rev/ec7eb3d2a427
branches: trunk
changeset: 766732:ec7eb3d2a427
user: mrg <mrg%NetBSD.org@localhost>
date: Fri Jul 01 02:18:54 2011 +0000
description:
avoid an overflow condition.
diffstat:
external/bsd/ntp/dist/ntpd/ntp_control.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r c91583db7293 -r ec7eb3d2a427 external/bsd/ntp/dist/ntpd/ntp_control.c
--- a/external/bsd/ntp/dist/ntpd/ntp_control.c Fri Jul 01 02:18:37 2011 +0000
+++ b/external/bsd/ntp/dist/ntpd/ntp_control.c Fri Jul 01 02:18:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ntp_control.c,v 1.2 2010/12/04 23:08:35 christos Exp $ */
+/* $NetBSD: ntp_control.c,v 1.3 2011/07/01 02:18:54 mrg Exp $ */
/*
* ntp_control.c - respond to control messages and send async traps
@@ -527,7 +527,7 @@
*/
rpkt.r_m_e_op = (u_char) (CTL_RESPONSE|CTL_ERROR|(res_opcode &
CTL_OP_MASK));
- rpkt.status = htons((u_short) ((errcode<<8) & 0xff00));
+ rpkt.status = htons((u_short) ((errcode & 0xff) << 8));
rpkt.count = 0;
/*
Home |
Main Index |
Thread Index |
Old Index