nagios-nrpe (2.12-4) 04_weird_output.dpatch

Summary

 src/nrpe.c |    3 +++
 1 file changed, 3 insertions(+)

    
download this patch

Patch contents

#! /bin/sh /usr/share/dpatch/dpatch-run
## 04_weird_output.dpatch by  <luk@luknote>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Clean buffer before use

@DPATCH@
diff -urNad nagios-nrpe-2.12~/src/nrpe.c nagios-nrpe-2.12/src/nrpe.c
--- nagios-nrpe-2.12~/src/nrpe.c	2008-09-14 16:19:36.000000000 +0200
+++ nagios-nrpe-2.12/src/nrpe.c	2008-09-14 16:21:19.000000000 +0200
@@ -1165,6 +1165,9 @@
 	/* disable connection alarm - a new alarm will be setup during my_system */
 	alarm(0);
 
+	// null buffer before using it!
+	memset(buffer,0,sizeof(buffer));
+
 	/* if this is the version check command, just spew it out */
 	if(!strcmp(command_name,NRPE_HELLO_COMMAND)){