-
I know we should sanitize whatever pointers we hand over to the library but is there any way to mitigate this?
This will segV and that's not a surprise. Since our code is full of char* ptrs and some could be null I wrote a wrapper around this
I've also derived and overriden quill::ConsoleSink to format my logs in a certain way. All this works very well (and I love your library - it's fast, super configurable and well maintained!) So now I can do
However I want to implement 1 "extra credit" feature.
I'd expect it to show up as
That will work if I define FIXED_LOG_INFO as
But it will segV if I give it a nullptr for a char* because VA_ARGS go to the Quill macro interface. Any ways you think I can avoid the segfault? I can't scrub the codebase for all potential null char* ptrs unfortunately, there are simply too many. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
hey, thanks for reporting. It is not expected to try to log a nullptr but I do not mind adding a check for nullptr for |
Beta Was this translation helpful? Give feedback.
hey, thanks for reporting. It is not expected to try to log a nullptr but I do not mind adding a check for nullptr for
char*
andchar const*
so you can log those without having to check on your side#737