From 774b3c6e68d8c05393aed498d5b38c8e58238494 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 30 Dec 2022 08:03:05 -0700 Subject: [PATCH] Don't send warn/fatal output to the debug file when fuzzing. --- include/sudo_fatal.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/sudo_fatal.h b/include/sudo_fatal.h index 35881257a..871bfc81c 100644 --- a/include/sudo_fatal.h +++ b/include/sudo_fatal.h @@ -28,6 +28,11 @@ #include "sudo_plugin.h" /* for conversation function */ +/* No output to debug files when fuzzing. */ +#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION +# define SUDO_ERROR_WRAP 0 +#endif + /* * We wrap fatal/fatalx and warn/warnx so that the same output can * go to the debug file, if there is one.