[e2fsprogs] Only set one flag for now (#8171)

Only set one flag for now

Co-authored-by: Max Shavrick <mxms@google.com>
This commit is contained in:
Max 2022-08-06 04:18:02 -07:00 committed by GitHub
parent 32c17072ed
commit 1ac061d41b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -36,8 +36,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
FuzzedDataProvider stream(data, size);
const FuzzerType f = stream.ConsumeEnum<FuzzerType>();
int flags = stream.ConsumeIntegral<int>();
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);

View File

@ -32,8 +32,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
FuzzedDataProvider stream(data, size);
const FuzzerType f = stream.ConsumeEnum<FuzzerType>();
int flags = stream.ConsumeIntegral<int>();
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);