diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-07-26 22:28:56 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-07-26 22:46:28 +0300 |
commit | 7b3851e9473e74043342d414c056c2ef87c2f261 (patch) | |
tree | ca24eb1f7f909a6665776e83ff22e8e91ddd3276 /src/test | |
parent | 31d2b4098a9e4ee9a694ba1ad42829637cbcf3c6 (diff) |
refactor: Drop unused CBufferedFile::Seek()
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/fuzz/buffered_file.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/test/fuzz/buffered_file.cpp b/src/test/fuzz/buffered_file.cpp index 6bbd13eb5c..e575640be5 100644 --- a/src/test/fuzz/buffered_file.cpp +++ b/src/test/fuzz/buffered_file.cpp @@ -31,7 +31,7 @@ void test_one_input(const std::vector<uint8_t>& buffer) if (opt_buffered_file && fuzzed_file != nullptr) { bool setpos_fail = false; while (fuzzed_data_provider.ConsumeBool()) { - switch (fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 5)) { + switch (fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 4)) { case 0: { std::array<uint8_t, 4096> arr{}; try { @@ -41,20 +41,16 @@ void test_one_input(const std::vector<uint8_t>& buffer) break; } case 1: { - opt_buffered_file->Seek(fuzzed_data_provider.ConsumeIntegralInRange<uint64_t>(0, 4096)); - break; - } - case 2: { opt_buffered_file->SetLimit(fuzzed_data_provider.ConsumeIntegralInRange<uint64_t>(0, 4096)); break; } - case 3: { + case 2: { if (!opt_buffered_file->SetPos(fuzzed_data_provider.ConsumeIntegralInRange<uint64_t>(0, 4096))) { setpos_fail = true; } break; } - case 4: { + case 3: { if (setpos_fail) { // Calling FindByte(...) after a failed SetPos(...) call may result in an infinite loop. break; @@ -65,7 +61,7 @@ void test_one_input(const std::vector<uint8_t>& buffer) } break; } - case 5: { + case 4: { ReadFromStream(fuzzed_data_provider, *opt_buffered_file); break; } |