fuzz_utils.h 713 B

12345678910111213141516171819202122232425
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_ZUCCHINI_FUZZERS_FUZZ_UTILS_H_
  5. #define COMPONENTS_ZUCCHINI_FUZZERS_FUZZ_UTILS_H_
  6. #include <stdint.h>
  7. #include <memory>
  8. #include <vector>
  9. #include "components/zucchini/disassembler.h"
  10. namespace zucchini {
  11. // Helper function that uses |disassembler| to read all references from
  12. // |mutable_data| and write them back.
  13. void ReadAndWriteReferences(
  14. std::unique_ptr<zucchini::Disassembler> disassembler,
  15. std::vector<uint8_t>* mutable_data);
  16. } // namespace zucchini
  17. #endif // COMPONENTS_ZUCCHINI_FUZZERS_FUZZ_UTILS_H_