From 1ac061d41b9c53c847afbfbb437b380d8f462733 Mon Sep 17 00:00:00 2001 From: Max <628527+Maximus-@users.noreply.github.com> Date: Sat, 6 Aug 2022 04:18:02 -0700 Subject: [PATCH] [e2fsprogs] Only set one flag for now (#8171) Only set one flag for now Co-authored-by: Max Shavrick --- projects/e2fsprogs/fuzz/ext2fs_image_read_write_fuzzer.cc | 4 +--- projects/e2fsprogs/fuzz/ext2fs_read_bitmap_fuzzer.cc | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/projects/e2fsprogs/fuzz/ext2fs_image_read_write_fuzzer.cc b/projects/e2fsprogs/fuzz/ext2fs_image_read_write_fuzzer.cc index cc175d0e4..863c483f2 100644 --- a/projects/e2fsprogs/fuzz/ext2fs_image_read_write_fuzzer.cc +++ b/projects/e2fsprogs/fuzz/ext2fs_image_read_write_fuzzer.cc @@ -36,8 +36,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { FuzzedDataProvider stream(data, size); const FuzzerType f = stream.ConsumeEnum(); - int flags = stream.ConsumeIntegral(); - flags &= (~EXT2_FLAG_NOFREE_ON_ERROR); // Unset EXT2_FLAG_NOFREE_ON_ERROR static const char* fname = "ext2_test_file"; @@ -51,7 +49,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ext2_filsys fs; errcode_t retval = ext2fs_open( fspath.c_str(), - flags | EXT2_FLAG_IGNORE_CSUM_ERRORS, 0, 0, + EXT2_FLAG_IGNORE_CSUM_ERRORS, 0, 0, unix_io_manager, &fs); diff --git a/projects/e2fsprogs/fuzz/ext2fs_read_bitmap_fuzzer.cc b/projects/e2fsprogs/fuzz/ext2fs_read_bitmap_fuzzer.cc index d8a8c1eda..97e7cf0af 100644 --- a/projects/e2fsprogs/fuzz/ext2fs_read_bitmap_fuzzer.cc +++ b/projects/e2fsprogs/fuzz/ext2fs_read_bitmap_fuzzer.cc @@ -32,8 +32,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { FuzzedDataProvider stream(data, size); const FuzzerType f = stream.ConsumeEnum(); - int flags = stream.ConsumeIntegral(); - flags &= (~EXT2_FLAG_NOFREE_ON_ERROR); // Unset EXT2_FLAG_NOFREE_ON_ERROR static const char* fname = "ext2_test_file"; @@ -47,7 +45,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ext2_filsys fs; errcode_t retval = ext2fs_open( fspath.c_str(), - flags | EXT2_FLAG_IGNORE_CSUM_ERRORS, 0, 0, + EXT2_FLAG_IGNORE_CSUM_ERRORS, 0, 0, unix_io_manager, &fs);