| 101 | } |
| 102 | |
| 103 | [[nodiscard]] inline std::vector<uint8_t> ConsumeRandomLengthByteVector(FuzzedDataProvider& fuzzed_data_provider, const std::optional<size_t>& max_length = std::nullopt) noexcept |
| 104 | { |
| 105 | const std::string s = max_length ? |
| 106 | fuzzed_data_provider.ConsumeRandomLengthString(*max_length) : |
| 107 | fuzzed_data_provider.ConsumeRandomLengthString(); |
| 108 | return {s.begin(), s.end()}; |
| 109 | } |
| 110 | |
| 111 | [[nodiscard]] inline std::vector<bool> ConsumeRandomLengthBitVector(FuzzedDataProvider& fuzzed_data_provider, const std::optional<size_t>& max_length = std::nullopt) noexcept |
| 112 | { |
no test coverage detected