Module Name: src
Committed By: mrg
Date: Fri Jul 1 02:18:54 UTC 2011
Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_control.c
Log Message:
avoid an overflow condition.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ntp/dist/ntpd/ntp_control.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/ntp/dist/ntpd/ntp_control.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_control.c:1.2 src/external/bsd/ntp/dist/ntpd/ntp_control.c:1.3
--- src/external/bsd/ntp/dist/ntpd/ntp_control.c:1.2 Sat Dec 4 23:08:35 2010
+++ src/external/bsd/ntp/dist/ntpd/ntp_control.c Fri Jul 1 02:18:54 2011
@@ -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;
/*