Closed Massimo-B closed 1 year ago
I had same issue when I tried to update pcre2 to 10.41 or 10.42, reverting it back to 10.40 solved the problem.
Thanks, I masked 10.42 and downgraded to 10.40. I'm not sure how to reproduce the issue, watching if it happens again in the next days. I would like to file the issue on https://github.com/PCRE2Project/pcre2/issues but I can't actually describe the bug against the library. Is this bug already known and filed there?
I think I've found the problem. Metalog is not initializing the directory name pointer for consolelog entries. I guess malloc()
is giving it memory that was used by pcre earlier in the program and by change always contained zeroes with the old versions of the library, but not anymore in 10.41.
Here is the fix:
diff -bur metalog-metalog-20220214-orig/src/metalog.c metalog-metalog-20220214/src/metalog.c
--- metalog-metalog-20220214-orig/src/metalog.c 2022-02-13 17:03:27.000000000 +0200
+++ metalog-metalog-20220214/src/metalog.c 2023-03-09 13:27:17.000000000 +0200
@@ -212,8 +212,10 @@
}
if (strcasecmp(value, "NONE") != 0)
new_output->directory = logdir;
- else
+ else {
free(logdir);
+ new_output->directory = NULL;
+ }
new_output->fp = NULL;
new_output->perms = (*cur_block)->perms;
new_output->size = (off_t) 0;
@LoneFox78: Thank you for finding and fixing this!
How can I see which release does include this bugfix?
@Massimo-B It is fixed in the last two releases: 20230707 and 20230719.
Something is broken since I enabled consolelog. I found some / subdirs now with weird namings
containing files .timestamp and current with the log entries in current.
Enabled in /etc/metalog.conf as most early block: