[Nagiosplug-checkins] SF.net SVN: nagiosplug:[2086] nagiosplug/trunk

dermoth at users.sourceforge.net dermoth at users.sourceforge.net
Wed Nov 19 06:59:33 CET 2008


Revision: 2086
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2086&view=rev
Author:   dermoth
Date:     2008-11-19 05:59:33 +0000 (Wed, 19 Nov 2008)

Log Message:
-----------
Fixed buffer overflow in check_ntp/check_ntp_peer (#1999319, Ubuntu #291265)

Modified Paths:
--------------
    nagiosplug/trunk/NEWS
    nagiosplug/trunk/plugins/check_ntp.c
    nagiosplug/trunk/plugins/check_ntp_peer.c

Modified: nagiosplug/trunk/NEWS
===================================================================
--- nagiosplug/trunk/NEWS	2008-11-19 05:59:22 UTC (rev 2085)
+++ nagiosplug/trunk/NEWS	2008-11-19 05:59:33 UTC (rev 2086)
@@ -16,6 +16,7 @@
 	check_icmp now reports min and max round trip time perfdata (Steve Rader)
 	Fixed bug where additional headers with redirection caused a segfault (Dieter Van de Walle - 2089159)
 	check_disk: make autofs mount paths specified with -p before we determing the mount list (Erik Welch)
+	Fixed buffer overflow in check_ntp/check_ntp_peer (#1999319, Ubuntu #291265)
 
 1.4.13 25th Sept 2008
 	Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen)

Modified: nagiosplug/trunk/plugins/check_ntp.c
===================================================================
--- nagiosplug/trunk/plugins/check_ntp.c	2008-11-19 05:59:22 UTC (rev 2085)
+++ nagiosplug/trunk/plugins/check_ntp.c	2008-11-19 05:59:33 UTC (rev 2086)
@@ -198,7 +198,7 @@
 /* NTP control message header is 12 bytes, plus any data in the data
  * field, plus null padding to the nearest 32-bit boundary per rfc.
  */
-#define SIZEOF_NTPCM(m) (12+ntohs(m.count)+((m.count)?4-(ntohs(m.count)%4):0))
+#define SIZEOF_NTPCM(m) (12+ntohs(m.count)+((ntohs(m.count)%4)?4-(ntohs(m.count)%4):0))
 
 /* finally, a little helper or two for debugging: */
 #define DBG(x) do{if(verbose>1){ x; }}while(0);

Modified: nagiosplug/trunk/plugins/check_ntp_peer.c
===================================================================
--- nagiosplug/trunk/plugins/check_ntp_peer.c	2008-11-19 05:59:22 UTC (rev 2085)
+++ nagiosplug/trunk/plugins/check_ntp_peer.c	2008-11-19 05:59:33 UTC (rev 2086)
@@ -131,7 +131,7 @@
 /* NTP control message header is 12 bytes, plus any data in the data
  * field, plus null padding to the nearest 32-bit boundary per rfc.
  */
-#define SIZEOF_NTPCM(m) (12+ntohs(m.count)+((m.count)?4-(ntohs(m.count)%4):0))
+#define SIZEOF_NTPCM(m) (12+ntohs(m.count)+((ntohs(m.count)%4)?4-(ntohs(m.count)%4):0))
 
 /* finally, a little helper or two for debugging: */
 #define DBG(x) do{if(verbose>1){ x; }}while(0);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Commits mailing list