aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-extended/nagios/nagios-nrpe/0001-Should-fix-235-nasty_metachars-was-not-being-returne.patch
blob: fb34c5c7659b9f93c6268b92edf4ad3ded29fc66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 4f7dd1199f1f3f72f9197e8565da339a4a2490b7 Mon Sep 17 00:00:00 2001
From: madlohe <swolf@nagios.com>
Date: Thu, 23 Apr 2020 15:33:18 -0500
Subject: [PATCH] Should fix #235 (nasty_metachars was not being returned when
 specified in cfg file

CVE: CVE-2020-6581
Upstream-Status: Backport [4f7dd1199f1f3f72f9197e8565da339a4a2490b7]

Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
---
 src/nrpe.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/nrpe.c b/src/nrpe.c
index 01fbd1d..bf64963 100644
--- a/src/nrpe.c
+++ b/src/nrpe.c
@@ -823,6 +823,8 @@ char* process_metachars(const char* input)
 		}
 	}
 	copy[j] = '\0';
+
+	return copy;
 }
 
 /* read in the configuration file */
-- 
2.20.1