mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
fuzz: always call fuzz_setup_logging()
This commit is contained in:
@@ -12,6 +12,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
if (outside_size_range(size, 0, 100*1024))
|
||||
return 0;
|
||||
|
||||
fuzz_setup_logging();
|
||||
|
||||
p = memdup(data, size);
|
||||
assert_se(p);
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
if (data[SEP_LEN] != '\0')
|
||||
return 0;
|
||||
|
||||
fuzz_setup_logging();
|
||||
|
||||
_cleanup_free_ char *p = memdup_suffix0(data + SEP_LEN + 1, size - SEP_LEN - 1);
|
||||
assert_se(p);
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
const Input *i = (const Input *) data;
|
||||
size_t len = size - offsetof(Input, str);
|
||||
|
||||
fuzz_setup_logging();
|
||||
|
||||
PRINTF_ONE(i->status, "%*.*s", i->field_width, (int) len, i->str);
|
||||
PRINTF_ONE(i->status, "%*.*ls", i->field_width, (int) (len / sizeof(wchar_t)), (const wchar_t *) i->str);
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
if (outside_size_range(size, sizeof(size_t), 64 * 1024))
|
||||
return 0;
|
||||
|
||||
fuzz_setup_logging();
|
||||
|
||||
size_t len, len2;
|
||||
memcpy(&len, data, sizeof(len));
|
||||
data += sizeof(len);
|
||||
|
||||
@@ -12,6 +12,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
char *value = UINT_TO_PTR(0x12345678U);
|
||||
char *endpos = UINT_TO_PTR(0x87654321U);
|
||||
|
||||
fuzz_setup_logging();
|
||||
|
||||
assert_se(str = malloc(size + 1));
|
||||
memcpy(str, data, size);
|
||||
str[size] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user