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

git at icinga.org git at icinga.org
Tue Aug 28 10:31:21 CEST 2012


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

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 ceabd50..3a245a3 100644
--- a/base/utils.c
+++ b/base/utils.c
@@ -3603,6 +3603,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