/system/bt/osi/test/fuzzers/list/ |
D | fuzz_list.cc | 32 FuzzedDataProvider* dataProvider = in list_iter_cb_impl() local 34 return dataProvider->ConsumeBool(); in list_iter_cb_impl() 37 list_t* createList(FuzzedDataProvider* dataProvider) { in createList() argument 38 bool should_callback = dataProvider->ConsumeBool(); in createList() 47 FuzzedDataProvider* dataProvider) { in getArbitraryElement() argument 53 dataProvider->ConsumeIntegralInRange<size_t>(0, vector->size() - 1); in getArbitraryElement() 57 list_node_t* getArbitraryNode(list_t* list, FuzzedDataProvider* dataProvider) { in getArbitraryNode() argument 62 dataProvider->ConsumeIntegralInRange<size_t>(0, list_length(list) - 1); in getArbitraryNode() 73 FuzzedDataProvider* dataProvider) { in callArbitraryFunction() argument 76 switch (dataProvider->ConsumeIntegralInRange<char>(0, 18)) { in callArbitraryFunction() [all …]
|
/system/core/libutils/ |
D | String16_fuzz.cpp | 57 ([](FuzzedDataProvider& dataProvider, android::String16 str1, 59 int pos = dataProvider.ConsumeIntegralInRange<int>(0, str1.size()); in __anon9568f35f0902() 64 ([](FuzzedDataProvider& dataProvider, android::String16 str1, 66 char16_t findChar = dataProvider.ConsumeIntegral<char16_t>(); in __anon9568f35f0a02() 69 ([](FuzzedDataProvider& dataProvider, android::String16 str1, 71 char16_t findChar = dataProvider.ConsumeIntegral<char16_t>(); in __anon9568f35f0b02() 74 ([](FuzzedDataProvider& dataProvider, android::String16 str1, 76 char16_t findChar = dataProvider.ConsumeIntegral<char16_t>(); in __anon9568f35f0c02() 77 char16_t replaceChar = dataProvider.ConsumeIntegral<char16_t>(); in __anon9568f35f0c02() 80 ([](FuzzedDataProvider& dataProvider, android::String16 str1, [all …]
|
D | String8_fuzz.cpp | 69 [](FuzzedDataProvider& dataProvider, android::String8 str1, 72 int start_index = dataProvider.ConsumeIntegralInRange<int>(0, str1.size()); in __anonebbe45100c02() 97 [](FuzzedDataProvider& dataProvider, android::String8 str1, 99 str1.setPathName(dataProvider.ConsumeBytesWithTerminator<char>(5).data()); in __anonebbe45101302() 101 [](FuzzedDataProvider& dataProvider, android::String8 str1, 103 str1.appendPath(dataProvider.ConsumeBytesWithTerminator<char>(5).data()); in __anonebbe45101402() 107 void callFunc(uint8_t index, FuzzedDataProvider& dataProvider, android::String8 str1, in callFunc() argument 109 operations[index](dataProvider, str1, str2); in callFunc() 113 FuzzedDataProvider dataProvider(data, size); in LLVMFuzzerTestOneInput() local 115 const size_t kVecOneLen = dataProvider.ConsumeIntegralInRange<size_t>(1, MAX_STRING_BYTES); in LLVMFuzzerTestOneInput() [all …]
|
D | FileMap_fuzz.cpp | 26 FuzzedDataProvider dataProvider(data, size); in LLVMFuzzerTestOneInput() local 29 std::string contents = dataProvider.ConsumeRandomLengthString(MAX_STR_SIZE); in LLVMFuzzerTestOneInput() 38 std::string orig_name = dataProvider.ConsumeRandomLengthString(MAX_FILENAME_SIZE); in LLVMFuzzerTestOneInput() 39 size_t length = dataProvider.ConsumeIntegralInRange<size_t>(1, SIZE_MAX); in LLVMFuzzerTestOneInput() 40 off64_t offset = dataProvider.ConsumeIntegralInRange<off64_t>(1, INT64_MAX); in LLVMFuzzerTestOneInput() 41 bool read_only = dataProvider.ConsumeBool(); in LLVMFuzzerTestOneInput() 47 int enum_index = dataProvider.ConsumeIntegral<int>(); in LLVMFuzzerTestOneInput()
|
D | BitSet_fuzz.cpp | 56 FuzzedDataProvider dataProvider(data, size); in LLVMFuzzerTestOneInput() local 57 uint32_t thirty_two_base = dataProvider.ConsumeIntegral<uint32_t>(); in LLVMFuzzerTestOneInput() 58 uint64_t sixty_four_base = dataProvider.ConsumeIntegral<uint64_t>(); in LLVMFuzzerTestOneInput() 63 while (dataProvider.remaining_bytes() > 0 && opsRun++ < MAX_OPERATIONS) { in LLVMFuzzerTestOneInput() 64 uint32_t bit = dataProvider.ConsumeIntegral<uint32_t>(); in LLVMFuzzerTestOneInput() 65 uint8_t op = dataProvider.ConsumeIntegral<uint8_t>(); in LLVMFuzzerTestOneInput()
|
D | Vector_fuzz.cpp | 21 FuzzedDataProvider dataProvider(data, size); in runVectorFuzz() local 27 size_t vectorSize = dataProvider.ConsumeIntegralInRange<size_t>(0, MAX_VEC_SIZE); in runVectorFuzz() 31 uint8_t count = dataProvider.ConsumeIntegralInRange<uint8_t>(1, 5); in runVectorFuzz() 40 size_t index = dataProvider.ConsumeIntegralInRange<size_t>(0, vec.size()); in runVectorFuzz() 41 std::vector<uint8_t> remainingVec = dataProvider.ConsumeRemainingBytes<uint8_t>(); in runVectorFuzz()
|
/system/bt/osi/test/fuzzers/ringbuffer/ |
D | fuzz_ringbuffer.cc | 24 FuzzedDataProvider* dataProvider) { in getArbitraryRingBuf() argument 29 size_t index = dataProvider->ConsumeIntegralInRange<size_t>( in getArbitraryRingBuf() 35 FuzzedDataProvider* dataProvider) { in callArbitraryFunction() argument 37 char func_id = dataProvider->ConsumeIntegralInRange<char>(0, 8); in callArbitraryFunction() 47 dataProvider->ConsumeIntegralInRange<size_t>(0, MAX_BUF_SIZE); in callArbitraryFunction() 58 size_t index = dataProvider->ConsumeIntegralInRange<size_t>( in callArbitraryFunction() 68 buf = getArbitraryRingBuf(ringbuf_vector, dataProvider); in callArbitraryFunction() 74 buf = getArbitraryRingBuf(ringbuf_vector, dataProvider); in callArbitraryFunction() 80 buf = getArbitraryRingBuf(ringbuf_vector, dataProvider); in callArbitraryFunction() 82 dataProvider->ConsumeIntegralInRange<size_t>(1, MAX_BUF_SIZE); in callArbitraryFunction() [all …]
|
/system/bt/osi/test/fuzzers/alarm/ |
D | fuzz_alarm.cc | 49 alarm_t* fuzz_init_alarm(FuzzedDataProvider* dataProvider) { in fuzz_init_alarm() argument 51 dataProvider->ConsumeIntegralInRange<size_t>(0, MAX_BUFFER_LEN); in fuzz_init_alarm() 53 dataProvider->ConsumeBytesWithTerminator<char>(name_len, '\0'); in fuzz_init_alarm() 57 if (dataProvider->ConsumeBool()) { in fuzz_init_alarm() 65 FuzzedDataProvider* dataProvider) { in fuzz_set_alarm() argument 69 dataProvider->ConsumeIntegralInRange<size_t>(1, MAX_BUFFER_LEN); in fuzz_set_alarm() 76 dataProvider->ConsumeBytes<uint8_t>(buff_len); in fuzz_set_alarm() 82 if (dataProvider->ConsumeBool()) { in fuzz_set_alarm() 94 FuzzedDataProvider dataProvider(Data, Size); in LLVMFuzzerTestOneInput() local 101 if (dataProvider.ConsumeBool()) { in LLVMFuzzerTestOneInput() [all …]
|
/system/bt/osi/test/fuzzers/fixed_queue/ |
D | fuzz_fixed_queue.cc | 38 fixed_queue_free_cb cbOrNull(FuzzedDataProvider* dataProvider) { in cbOrNull() argument 39 bool null_cb = dataProvider->ConsumeBool(); in cbOrNull() 76 FuzzedDataProvider* dataProvider) { in callArbitraryFunction() argument 81 switch (dataProvider->ConsumeIntegralInRange<char>(0, 17)) { in callArbitraryFunction() 88 fixed_queue_flush(fixed_queue, cbOrNull(dataProvider)); in callArbitraryFunction() 107 buf_ptr = generateBuffer(dataProvider, MAX_BUF_SIZE, false); in callArbitraryFunction() 120 buf_ptr = generateBuffer(dataProvider, MAX_BUF_SIZE, false); in callArbitraryFunction() 151 index = dataProvider->ConsumeIntegralInRange<size_t>( in callArbitraryFunction() 161 reinterpret_cast<void*>(dataProvider->ConsumeIntegral<uint64_t>()); in callArbitraryFunction() 210 FuzzedDataProvider dataProvider(Data, Size); in LLVMFuzzerTestOneInput() local [all …]
|
/system/bt/osi/test/fuzzers/allocator/ |
D | fuzz_allocator.cc | 25 FuzzedDataProvider* dataProvider) { in callArbitraryFunction() argument 27 char func_id = dataProvider->ConsumeIntegralInRange<char>(0, 6); in callArbitraryFunction() 38 dataProvider->ConsumeIntegralInRange<size_t>(0, MAX_BUF_SIZE); in callArbitraryFunction() 59 size_t index = dataProvider->ConsumeIntegralInRange<size_t>( in callArbitraryFunction() 76 char* buf = generateBuffer(dataProvider, MAX_BUF_SIZE, true); in callArbitraryFunction() 85 dataProvider->ConsumeIntegralInRange<size_t>(1, MAX_BUF_SIZE); in callArbitraryFunction() 101 FuzzedDataProvider dataProvider(Data, Size); in LLVMFuzzerTestOneInput() local 107 dataProvider.ConsumeIntegralInRange<size_t>(0, MAX_NUM_FUNCTIONS); in LLVMFuzzerTestOneInput() 109 callArbitraryFunction(&alloc_vector, &dataProvider); in LLVMFuzzerTestOneInput()
|
/system/bt/osi/test/fuzzers/allocation_tracker/ |
D | fuzz_allocation_tracker.cc | 47 FuzzedDataProvider* dataProvider) { in callArbitraryFunction() argument 49 switch (dataProvider->ConsumeIntegralInRange<char>(0, 6)) { in callArbitraryFunction() 66 alloc.alloc_id = dataProvider->ConsumeIntegral<allocator_id_t>(); in callArbitraryFunction() 68 dataProvider->ConsumeIntegralInRange<size_t>(1, MAX_BUF_SIZE); in callArbitraryFunction() 91 size_t index = dataProvider->ConsumeIntegralInRange<size_t>( in callArbitraryFunction() 105 dataProvider->ConsumeIntegralInRange<size_t>(0, MAX_BUF_SIZE); in callArbitraryFunction() 124 FuzzedDataProvider dataProvider(Data, Size); in LLVMFuzzerTestOneInput() local 131 dataProvider.ConsumeIntegralInRange<size_t>(0, MAX_NUM_FUNCTIONS); in LLVMFuzzerTestOneInput() 133 callArbitraryFunction(&alloc_vector, &dataProvider); in LLVMFuzzerTestOneInput()
|
/system/bt/gd/hci/fuzz/ |
D | acl_manager_fuzz_test.cc | 39 FuzzedDataProvider dataProvider(data, size); in LLVMFuzzerTestOneInput() local 43 fuzzHci->TurnOnAutoReply(&dataProvider); in LLVMFuzzerTestOneInput() 47 while (dataProvider.remaining_bytes() > 0) { in LLVMFuzzerTestOneInput() 48 const uint8_t action = dataProvider.ConsumeIntegralInRange(0, 2); in LLVMFuzzerTestOneInput() 51 fake_timerfd_advance(dataProvider.ConsumeIntegral<uint64_t>()); in LLVMFuzzerTestOneInput() 54 fuzzHci->injectArbitrary(dataProvider); in LLVMFuzzerTestOneInput()
|
D | hci_layer_fuzz_test.cc | 39 FuzzedDataProvider dataProvider(data, size); in LLVMFuzzerTestOneInput() local 46 while (dataProvider.remaining_bytes() > 0) { in LLVMFuzzerTestOneInput() 47 const uint8_t action = dataProvider.ConsumeIntegralInRange(0, 5); in LLVMFuzzerTestOneInput() 50 fake_timerfd_advance(dataProvider.ConsumeIntegral<uint64_t>()); in LLVMFuzzerTestOneInput() 53 fuzzHal->injectArbitrary(dataProvider); in LLVMFuzzerTestOneInput() 56 fuzzClient->injectArbitrary(dataProvider); in LLVMFuzzerTestOneInput()
|
/system/bt/osi/test/fuzzers/array/ |
D | fuzz_array.cc | 27 FuzzedDataProvider dataProvider(Data, Size); in LLVMFuzzerTestOneInput() local 31 dataProvider.ConsumeIntegralInRange<size_t>(1, MAX_ELEMENT_SIZE); in LLVMFuzzerTestOneInput() 38 dataProvider.ConsumeIntegralInRange<size_t>(0, MAX_ARRAY_LEN); in LLVMFuzzerTestOneInput() 41 uint32_t new_val = dataProvider.ConsumeIntegral<uint32_t>(); in LLVMFuzzerTestOneInput() 49 dataProvider.ConsumeIntegralInRange<size_t>(0, array_length(arr) - 1); in LLVMFuzzerTestOneInput()
|
/system/bt/osi/test/fuzzers/compat/ |
D | fuzz_compat.cc | 25 FuzzedDataProvider dataProvider(Data, Size); in LLVMFuzzerTestOneInput() local 28 dataProvider.ConsumeIntegralInRange<size_t>(0, MAX_BUFFER_SIZE); in LLVMFuzzerTestOneInput() 37 dataProvider.ConsumeBytesWithTerminator<char>(buf_size, '\0'); in LLVMFuzzerTestOneInput() 51 size_t len_to_cpy = dataProvider.ConsumeIntegralInRange<size_t>(0, buf_size); in LLVMFuzzerTestOneInput()
|
/system/bt/osi/test/fuzzers/future/ |
D | fuzz_future.cc | 24 FuzzedDataProvider dataProvider(Data, Size); in LLVMFuzzerTestOneInput() local 28 dataProvider.ConsumeIntegralInRange<size_t>(1, MAX_BUFFER_SIZE); in LLVMFuzzerTestOneInput() 33 std::vector<uint8_t> bytes = dataProvider.ConsumeBytes<uint8_t>(buf_size); in LLVMFuzzerTestOneInput() 38 bool is_immediate = dataProvider.ConsumeBool(); in LLVMFuzzerTestOneInput()
|
/system/bt/osi/test/fuzzers/buffer/ |
D | fuzz_buffer.cc | 25 FuzzedDataProvider dataProvider(Data, Size); in LLVMFuzzerTestOneInput() local 29 dataProvider.ConsumeIntegralInRange<size_t>(1, MAX_BUFFER_SIZE); in LLVMFuzzerTestOneInput() 39 dataProvider.ConsumeIntegralInRange<size_t>(0, MAX_NUM_SLICES); in LLVMFuzzerTestOneInput() 43 dataProvider.ConsumeIntegralInRange<size_t>(1, buf_size - 1); in LLVMFuzzerTestOneInput()
|
/system/bt/osi/test/fuzzers/include/ |
D | libosiFuzzHelperFunctions.h | 23 char* generateBuffer(FuzzedDataProvider* dataProvider, size_t max_buffer_size, in generateBuffer() argument 27 dataProvider->ConsumeIntegralInRange<size_t>(0, max_buffer_size); in generateBuffer() 34 std::vector<char> bytes = dataProvider->ConsumeBytes<char>(buf_size); in generateBuffer()
|