![](https://seccdn.libravatar.org/avatar/af22e20b6884acbc89be6d7736c43e92.jpg?s=120&d=mm&r=g)
Hello community,
here is the log from the commit of package nagios-nsca
checked in at Wed Oct 11 11:56:36 CEST 2006.
--------
--- nagios-nsca/nagios-nsca.changes 2006-02-02 21:19:46.000000000 +0100
+++ /mounts/work_src_done/STABLE/nagios-nsca/nagios-nsca.changes 2006-10-10 11:57:54.000000000 +0200
@@ -1,0 +2,5 @@
+Tue Oct 10 11:57:22 CEST 2006 - olh@suse.de
+
+- fix send_nsca segfault with -c and -d options
+
+-------------------------------------------------------------------
Old:
----
abuild.patch
encrypt-cleanup.patch
spooldir.patch
xinetd.patch
New:
----
nagios-nsca.abuild.patch
nagios-nsca.encrypt-cleanup.patch
nagios-nsca.send_nsca.formatstring.patch
nagios-nsca.spooldir.patch
nagios-nsca.xinetd.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nagios-nsca.spec ++++++
--- /var/tmp/diff_new_pack.5B75oP/_old 2006-10-11 11:56:20.000000000 +0200
+++ /var/tmp/diff_new_pack.5B75oP/_new 2006-10-11 11:56:20.000000000 +0200
@@ -5,7 +5,7 @@
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
-# Please submit bugfixes or comments via http://bugs.opensuse.org
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
@@ -14,7 +14,7 @@
BuildRequires: libmcrypt-devel nagios tcpd-devel
Summary: The Nagios Service Check Acceptor
Version: 2.5
-Release: 2
+Release: 20
URL: http://www.nagios.org/
License: GPL
Group: System/Monitoring
@@ -24,10 +24,11 @@
Obsoletes: netsaint-nsca
Source0: http://prdownloads.sourceforge.net/nagios/nsca-%{version}.tar.bz2
Source1: rcnsca
-Patch1: abuild.patch
-Patch2: xinetd.patch
-Patch3: spooldir.patch
-Patch4: encrypt-cleanup.patch
+Patch1: nagios-nsca.abuild.patch
+Patch2: nagios-nsca.xinetd.patch
+Patch3: nagios-nsca.spooldir.patch
+Patch4: nagios-nsca.encrypt-cleanup.patch
+Patch5: nagios-nsca.send_nsca.formatstring.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -43,13 +44,14 @@
%prep
%setup -n nsca-%{version}
-%patch1
-%patch2
-%patch3
-%patch4
-%{?suse_update_config:%{suse_update_config}}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
%build
+%{?suse_update_config:%{suse_update_config}}
export CFLAGS="$RPM_OPT_FLAGS"
%if %suse_version > 1000
export CFLAGS="$CFLAGS -fstack-protector"
@@ -100,6 +102,8 @@
%doc Changelog README SECURITY LEGAL
%changelog -n nagios-nsca
+* Tue Oct 10 2006 - olh@suse.de
+- fix send_nsca segfault with -c and -d options
* Thu Feb 02 2006 - stark@suse.de
- fixed crash while encrypt_cleanup()
* Wed Jan 25 2006 - mls@suse.de
++++++ nagios-nsca.abuild.patch ++++++
---
src/nsca.c | 2 ++
1 file changed, 2 insertions(+)
Index: nsca-2.5/src/nsca.c
===================================================================
--- nsca-2.5.orig/src/nsca.c
+++ nsca-2.5/src/nsca.c
@@ -555,6 +555,7 @@ static int find_rhand(int fd){
/* we couldn't find the read handler */
syslog(LOG_ERR, "Handler stack corrupt - aborting");
do_exit(STATE_CRITICAL);
+ return 0; /* not reached */
}
@@ -571,6 +572,7 @@ static int find_whand(int fd){
/* we couldn't find the write handler */
syslog(LOG_ERR, "Handler stack corrupt - aborting");
do_exit(STATE_CRITICAL);
+ return 0; /* not reached */
}
++++++ nagios-nsca.encrypt-cleanup.patch ++++++
---
src/utils.c | 4 ----
1 file changed, 4 deletions(-)
Index: nsca-2.5/src/utils.c
===================================================================
--- nsca-2.5.orig/src/utils.c
+++ nsca-2.5/src/utils.c
@@ -258,10 +258,6 @@ void encrypt_cleanup(int encryption_meth
CI->key=NULL;
free(CI->IV);
CI->IV=NULL;
- free(CI->mcrypt_algorithm);
- CI->mcrypt_algorithm=NULL;
- free(CI->mcrypt_mode);
- CI->mcrypt_mode=NULL;
}
#endif
++++++ nagios-nsca.send_nsca.formatstring.patch ++++++
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392010
...
metaur@metaur:~$ /usr/sbin/send_nsca -c %n%n%n%n
Segmentation fault
metaur@metaur:~$ /usr/sbin/send_nsca -d %n%n%n%n
Segmentation fault
...
---
src/send_nsca.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: nsca-2.5/src/send_nsca.c
===================================================================
--- nsca-2.5.orig/src/send_nsca.c
+++ nsca-2.5/src/send_nsca.c
@@ -421,7 +421,7 @@ int process_arguments(int argc, char **a
/* config file */
else if(!strcmp(argv[x-1],"-c")){
if(x