From: Thomas Guyot-Sionnest Date: Sat, 20 Jan 2007 06:07:48 +0000 (+0000) Subject: Fix bug #1632072 pointer error in plugins/netutils.c. Add changelog entry for previou... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e6d99d8ec38cc7bfd5d7021e102bdc8da7033dc0;p=nagiosplug.git Fix bug #1632072 pointer error in plugins/netutils.c. Add changelog entry for previous commit. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1568 f882894a-f735-0410-b71e-b25c423dba1c --- diff --git a/CHANGES b/CHANGES index d1abed0..05d3ba2 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,8 @@ This file documents the major additions and syntax changes between releases. Fixed check_swap for HP/UX where swapinfo command was incorrect Fixed check_disk inode threshold checks, regressed at r1.4.4. Fixed crit/warn for check_disk perf data + Fixed buffer overflow in check_procs + Fixed error handling for UNIX sockets in netutils.c 1.4.5 Fixed bug in perl's is_hostname routine diff --git a/THANKS.in b/THANKS.in index 9624911..0d0f4a5 100644 --- a/THANKS.in +++ b/THANKS.in @@ -206,3 +206,4 @@ Dick van den Burg Matthias Eble Sebastian Schubert Jason Hoos +Chris Grim diff --git a/plugins/netutils.c b/plugins/netutils.c index 9294f3a..e6ffc54 100644 --- a/plugins/netutils.c +++ b/plugins/netutils.c @@ -225,7 +225,7 @@ np_net_connect (const char *host_name, int port, int *sd, int proto) su.sun_family = AF_UNIX; strncpy(su.sun_path, host_name, UNIX_PATH_MAX); *sd = socket(PF_UNIX, SOCK_STREAM, 0); - if(sd < 0){ + if(*sd < 0){ die(STATE_UNKNOWN, _("Socket creation failed")); } result = connect(*sd, (struct sockaddr *)&su, sizeof(su));