Improved debug output. (#1951)

* try to get rid of some `printf(..)`s as they do not belong to a shared library
 * replaced all `exit(..)`s with `abort()`s to indicate an abnormal process termination

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
Toni
2023-04-21 12:40:26 +02:00
committed by GitHub
parent 85751ba9d7
commit b6629ba2be
5 changed files with 37 additions and 40 deletions
+1 -3
View File
@@ -6,8 +6,6 @@
#include <assert.h>
#include "fuzzer/FuzzedDataProvider.h"
extern "C" void ndpi_self_check_host_match(); /* Self check function */
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
FuzzedDataProvider fuzzed_data(data, size);
struct ndpi_detection_module_struct *ndpi_info_mod;
@@ -136,7 +134,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
ndpi_get_num_supported_protocols(ndpi_info_mod);
ndpi_get_ndpi_num_custom_protocols(ndpi_info_mod);
ndpi_self_check_host_match();
ndpi_self_check_host_match(stderr);
/* Basic code to try testing this "config" */
bool_value = fuzzed_data.ConsumeBool();