[icinga-checkins] icinga.org: icinga-core/r1.7: core: fix epn rewrite in #2197 causes segfault

git at icinga.org git at icinga.org
Tue Aug 28 10:33:14 CEST 2012


Module: icinga-core
Branch: r1.7
Commit: cedcb4a3f9fd34e2a72988e560a884fb0d8891af
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=cedcb4a3f9fd34e2a72988e560a884fb0d8891af

Author: Michael Friedrich <michael.friedrich at gmail.com>
Date:   Tue Aug 28 10:27:33 2012 +0200

core: fix epn rewrite in #2197 causes segfault

thanks dennis lichtenthaeler for the fix.

fixes #3027

---

 base/utils.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/base/utils.c b/base/utils.c
index b1891b9..c174a8a 100644
--- a/base/utils.c
+++ b/base/utils.c
@@ -3601,6 +3601,7 @@ int file_uses_embedded_perl(char *fname) {
 	/* grab the first line - we should see Perl. go home if not */
 	if (fgets(buf, 80, fp) == NULL || strstr(buf, "/bin/perl") == NULL) {
 		fclose(fp);
+		return FALSE;
 	}
 
 	/* epn directives must be found in first ten lines of plugin */





More information about the icinga-checkins mailing list