mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 23:16:14 +01:00
fuzzing: Only set the writer function once
This should fix fuzzing builds since commit dfb3517d
.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
oss-fuzz#47108
This commit is contained in:
parent
fa5947d3e7
commit
70e7161bc5
@ -17,6 +17,12 @@ static void
|
||||
fuzz_set_logging_func (void)
|
||||
{
|
||||
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
||||
g_log_set_writer_func (empty_logging_func, NULL, NULL);
|
||||
static gboolean writer_set = FALSE;
|
||||
|
||||
if (!writer_set)
|
||||
{
|
||||
g_log_set_writer_func (empty_logging_func, NULL, NULL);
|
||||
writer_set = TRUE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user