-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rulebase parse failure on AIX causing a segfault #353
Comments
Note: Using the compat asprintf as the OS doesn't provide one. # dump -Tv liblognorm.so.5 | grep -i asprintf
[389] 0x00000000 undef IMP DS EXTref [noIMid] asprintf |
For whatever reason lognormalizer binary seems to work if I do extra null check but I have no idea what are the long term effects when used in rsyslog for example: # git diff
diff --git a/src/pdag.c b/src/pdag.c
index 44a3847..9fb2cc2 100644
--- a/src/pdag.c
+++ b/src/pdag.c
@@ -497,10 +497,12 @@ ln_pdagComponentSetIDs(ln_ctx ctx, struct ln_pdag *const dag, const char *prefix
goto done;
}
} else {
+ if(prs->name == NULL) {
if(asprintf(&id, "%s%%%s:%s%%", prefix,
prs->name ? prs->name : "-",
parserName(prs->prsid)) == -1)
goto done;
+ }
}
ln_pdagComponentSetIDs(ctx, prs->node, id);
free(id); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running on AIX 7.1 and newest liblognorm release
# lognormalizer -V lognormalizer version: 2.0.6.master liblognorm version: 2.0.6.master advanced stats: not available
Test file, nothing interesting.
# cat test_ruleset.rb version=2 rule=:%this:number% %that:number% %-:rest%
Try it normally
Change newlines to dos style
# unix2dos test_ruleset.rb unix2dos: converting file test_ruleset.rb to DOS format...
And try again..
Truss outputs as well, if any use.
dbx output from the core:
The text was updated successfully, but these errors were encountered: