/packages/modules/Bluetooth/system/stack/test/fuzzers/sdp/ |
D | sdpFuzzFunctions.h | 42 [](FuzzedDataProvider* fdp) -> void { 49 uint8_t num_uuids = fdp->ConsumeIntegral<uint8_t>(); 51 uuid_list.push_back(generateArbitraryUuid(fdp)); 55 std::vector<uint16_t> attr_list = generateArbitraryAttrList(fdp); 58 fdp->ConsumeIntegralInRange<uint32_t>(0, SDP_MAX_DB_LEN); 74 [](FuzzedDataProvider* fdp) -> void { 77 getArbitraryVectorElement(fdp, sdp_db_vect, true).get()); 81 [](FuzzedDataProvider* fdp) -> void { 82 const RawAddress bd_addr = generateRawAddress(fdp); 84 getArbitraryVectorElement(fdp, sdp_db_vect, false).get(); [all …]
|
D | sdpFuzzHelpers.h | 90 std::vector<uint16_t> generateArbitraryAttrList(FuzzedDataProvider* fdp) { in generateArbitraryAttrList() argument 92 uint16_t num_attrs = fdp->ConsumeIntegralInRange<uint16_t>(0, SDP_MAX_ATTRS); in generateArbitraryAttrList() 96 attr_list.push_back(fdp->ConsumeIntegral<uint16_t>()); in generateArbitraryAttrList() 102 tSDP_DISC_ATVAL generateArbitrarySdpDiscAttrVal(FuzzedDataProvider* fdp) { in generateArbitrarySdpDiscAttrVal() argument 105 new_attrval.v.u8 = fdp->ConsumeIntegral<uint8_t>(); in generateArbitrarySdpDiscAttrVal() 106 new_attrval.v.u16 = fdp->ConsumeIntegral<uint16_t>(); in generateArbitrarySdpDiscAttrVal() 107 new_attrval.v.u32 = fdp->ConsumeIntegral<uint32_t>(); in generateArbitrarySdpDiscAttrVal() 109 new_attrval.v.array[i] = fdp->ConsumeIntegral<uint8_t>(); in generateArbitrarySdpDiscAttrVal() 111 new_attrval.v.p_sub_attr = generateArbitrarySdpDiscAttr(fdp, true).get(); in generateArbitrarySdpDiscAttrVal() 117 FuzzedDataProvider* fdp, bool allow_null) { in generateArbitrarySdpDiscAttr() argument [all …]
|
/packages/modules/Bluetooth/system/stack/test/fuzzers/a2dp/codec/ |
D | a2dpCodecFuzzFunctions.h | 41 [](FuzzedDataProvider* fdp) -> void { 45 fdp->ConsumeIntegralInRange<size_t>(0, MAX_NUM_PROPERTIES); 47 codec_priorities.push_back(getArbitraryBtavCodecConfig(fdp)); 60 [](FuzzedDataProvider* fdp) -> void { 66 fdp->ConsumeIntegralInRange<size_t>(0, a2dp_codecs_vect.size() - 1); 72 [](FuzzedDataProvider* fdp) -> void { 77 getArbitraryVectorElement(fdp, a2dp_codecs_vect, false); 86 [](FuzzedDataProvider* fdp) -> void { 88 getArbitraryVectorElement(fdp, a2dp_codecs_vect, false); 90 getArbitraryVectorElement(fdp, a2dp_codec_info_vect, false); [all …]
|
D | a2dpCodecConfigFuzzFunctions.h | 37 [](FuzzedDataProvider* fdp) -> void { 39 btav_a2dp_codec_index_t codec_index = getArbitraryBtavCodecIndex(fdp); 41 getArbitraryBtavCodecPriority(fdp); 52 [](FuzzedDataProvider* fdp) -> void { 57 size_t index = fdp->ConsumeIntegralInRange<size_t>( 64 [](FuzzedDataProvider* fdp) -> void { 66 getArbitraryVectorElement(fdp, a2dp_codec_config_vect, false)); 75 [](FuzzedDataProvider* fdp) -> void { 77 getArbitraryVectorElement(fdp, a2dp_codec_config_vect, false)); 86 [](FuzzedDataProvider* fdp) -> void { [all …]
|
D | a2dpCodecInfoFuzzFunctions.h | 40 [](FuzzedDataProvider* fdp, uint8_t*) -> void { 49 [](FuzzedDataProvider* fdp, uint8_t*) -> void { 54 size_t index = fdp->ConsumeIntegralInRange<size_t>( 63 [](FuzzedDataProvider* fdp, uint8_t* codec_info) -> void { 68 [](FuzzedDataProvider* fdp, uint8_t* codec_info) -> void { 73 [](FuzzedDataProvider* fdp, uint8_t* codec_info) -> void { 78 [](FuzzedDataProvider* fdp, uint8_t* codec_info) -> void { 83 [](FuzzedDataProvider* fdp, uint8_t* codec_info) -> void { 88 [](FuzzedDataProvider* fdp, uint8_t* codec_info) -> void { 93 [](FuzzedDataProvider* fdp, uint8_t* codec_info) -> void { [all …]
|
D | a2dpCodecHelperFunctions.h | 67 btav_a2dp_codec_index_t getArbitraryBtavCodecIndex(FuzzedDataProvider* fdp) { in getArbitraryBtavCodecIndex() argument 69 fdp->ConsumeIntegralInRange<size_t>(0, CODEC_INDEX_ENUM_VALS.size() - 1)); in getArbitraryBtavCodecIndex() 74 FuzzedDataProvider* fdp) { in getArbitraryBtavCodecPriority() argument 75 return CODEC_PRIORITY_ENUM_VALS.at(fdp->ConsumeIntegralInRange<size_t>( in getArbitraryBtavCodecPriority() 80 FuzzedDataProvider* fdp) { in getArbitraryBtavCodecSampleRate() argument 81 return CODEC_SAMPLERATE_ENUM_VALS.at(fdp->ConsumeIntegralInRange<size_t>( in getArbitraryBtavCodecSampleRate() 86 FuzzedDataProvider* fdp) { in getArbitraryBtavCodecBitsPerSample() argument 88 fdp->ConsumeIntegralInRange<size_t>(0, CODEC_BPS_ENUM_VALS.size() - 1)); in getArbitraryBtavCodecBitsPerSample() 92 FuzzedDataProvider* fdp) { in getArbitraryBtavCodecChannelMode() argument 93 return CODEC_CHANNELMODE_ENUM_VALS.at(fdp->ConsumeIntegralInRange<size_t>( in getArbitraryBtavCodecChannelMode() [all …]
|
/packages/modules/StatsD/lib/libstatssocket/fuzzers/ |
D | stats_event_fuzzer.cpp | 22 FuzzedDataProvider fdp(data, size); in LLVMFuzzerTestOneInput() local 30 AStatsEvent_setAtomId(event, fdp.ConsumeIntegral<int32_t>()); in LLVMFuzzerTestOneInput() 32 AStatsEvent_addBoolAnnotation(event, fdp.ConsumeIntegral<int32_t>(), fdp.ConsumeBool()); in LLVMFuzzerTestOneInput() 34 while (fdp.remaining_bytes() > 0) { in LLVMFuzzerTestOneInput() 35 AStatsEvent_writeInt32(event, fdp.ConsumeIntegral<int32_t>()); in LLVMFuzzerTestOneInput() 36 AStatsEvent_addBoolAnnotation(event, fdp.ConsumeIntegral<int32_t>(), fdp.ConsumeBool()); in LLVMFuzzerTestOneInput() 37 AStatsEvent_addInt32Annotation(event, fdp.ConsumeIntegral<int32_t>(), in LLVMFuzzerTestOneInput() 38 fdp.ConsumeIntegral<int32_t>()); in LLVMFuzzerTestOneInput() 39 AStatsEvent_writeBool(event, fdp.ConsumeBool()); in LLVMFuzzerTestOneInput() 40 AStatsEvent_addBoolAnnotation(event, fdp.ConsumeIntegral<int32_t>(), fdp.ConsumeBool()); in LLVMFuzzerTestOneInput() [all …]
|
/packages/modules/Bluetooth/system/gd/hci/fuzz/ |
D | fuzz_hci_layer.cc | 99 void FuzzHciLayer::injectArbitrary(FuzzedDataProvider& fdp) { in injectArbitrary() argument 100 const uint8_t action = fdp.ConsumeIntegralInRange(0, 13); in injectArbitrary() 103 injectAclData(GetArbitraryBytes(&fdp)); in injectArbitrary() 106 injectCommandComplete(GetArbitraryBytes(&fdp)); in injectArbitrary() 109 injectCommandStatus(GetArbitraryBytes(&fdp)); in injectArbitrary() 112 injectEvent(fdp); in injectArbitrary() 115 injectLeEvent(fdp); in injectArbitrary() 118 injectSecurityEvent(GetArbitraryBytes(&fdp)); in injectArbitrary() 121 injectLeSecurityEvent(GetArbitraryBytes(&fdp)); in injectArbitrary() 124 injectAclEvent(GetArbitraryBytes(&fdp)); in injectArbitrary() [all …]
|
D | hci_layer_fuzz_client.cc | 60 void HciLayerFuzzClient::injectArbitrary(FuzzedDataProvider& fdp) { in injectArbitrary() argument 61 const uint8_t action = fdp.ConsumeIntegralInRange(0, 8); in injectArbitrary() 64 injectAclData(GetArbitraryBytes(&fdp)); in injectArbitrary() 67 injectHciCommand(GetArbitraryBytes(&fdp)); in injectArbitrary() 73 injectLeSecurityCommand(GetArbitraryBytes(&fdp)); in injectArbitrary() 76 injectAclConnectionCommand(GetArbitraryBytes(&fdp)); in injectArbitrary() 79 injectLeAclConnectionCommand(GetArbitraryBytes(&fdp)); in injectArbitrary() 82 injectLeAdvertisingCommand(GetArbitraryBytes(&fdp)); in injectArbitrary() 85 injectLeScanningCommand(GetArbitraryBytes(&fdp)); in injectArbitrary()
|
/packages/modules/Bluetooth/system/stack/test/fuzzers/a2dp/ |
D | a2dpFuzzFunctions.h | 55 [](FuzzedDataProvider* fdp) -> void { 57 fdp->ConsumeBytesWithTerminator<char>(MAX_STR_LEN); 59 fdp->ConsumeBytesWithTerminator<char>(MAX_STR_LEN); 60 uint16_t service_uuid = fdp->ConsumeBool() ? UUID_SERVCLASS_AUDIO_SOURCE 63 p_provider_name.data(), fdp->ConsumeIntegral<uint16_t>(), 65 getArbitraryVectorElement(fdp, sdp_record_handles, true)); 69 [](FuzzedDataProvider* fdp) -> void { 71 tA2DP_SDP_DB_PARAMS p_db = generateDBParams(fdp, attr_list); 72 const RawAddress bd_addr = generateRawAddress(fdp); 73 uint16_t service_uuid = fdp->ConsumeBool() ? UUID_SERVCLASS_AUDIO_SOURCE [all …]
|
/packages/services/Car/cpp/evs/manager/1.1/test/fuzzer/ |
D | HalCameraFuzzer.cpp | 63 FuzzedDataProvider fdp(data, size); in LLVMFuzzerTestOneInput() local 70 while (fdp.remaining_bytes() > kMaxFuzzerConsumedBytes) { in LLVMFuzzerTestOneInput() 71 switch (fdp.ConsumeIntegralInRange<uint32_t>(0, EVS_FUZZ_API_SUM)) { in LLVMFuzzerTestOneInput() 82 fdp.ConsumeIntegralInRange<uint32_t>(0, virtualCameras.size() - 1); in LLVMFuzzerTestOneInput() 91 fdp.ConsumeIntegralInRange<uint32_t>(0, virtualCameras.size() - 1); in LLVMFuzzerTestOneInput() 118 uint32_t delta = fdp.ConsumeIntegral<int32_t>(); in LLVMFuzzerTestOneInput() 133 fdp.ConsumeIntegralInRange<uint32_t>(0, virtualCameras.size() - 1); in LLVMFuzzerTestOneInput() 147 fdp.ConsumeIntegralInRange<uint32_t>(0, virtualCameras.size() - 1); in LLVMFuzzerTestOneInput() 156 fdp.ConsumeIntegralInRange<uint32_t>(0, vBufferDesc_1_0.size() - 1); in LLVMFuzzerTestOneInput() 165 fdp.ConsumeIntegralInRange<uint32_t>(0, vBufferDesc_1_1.size() - 1); in LLVMFuzzerTestOneInput() [all …]
|
D | VirtualCameraFuzzer.cpp | 60 FuzzedDataProvider fdp(data, size); in LLVMFuzzerTestOneInput() local 70 while (fdp.remaining_bytes() > kMaxFuzzerConsumedBytes) { in LLVMFuzzerTestOneInput() 71 switch (fdp.ConsumeIntegralInRange<uint32_t>(0, EVS_FUZZ_API_SUM)) { in LLVMFuzzerTestOneInput() 102 uint32_t type = fdp.ConsumeIntegralInRange< in LLVMFuzzerTestOneInput() 112 buffer.bufferId = fdp.ConsumeIntegral<int32_t>(); in LLVMFuzzerTestOneInput() 124 uint32_t delta = fdp.ConsumeIntegral<uint32_t>(); in LLVMFuzzerTestOneInput() 142 fdp.ConsumeIntegralInRange<uint32_t>(0, vBufferDesc_1_0.size() - 1); in LLVMFuzzerTestOneInput() 155 uint32_t opaqueIdentifier = fdp.ConsumeIntegral<uint32_t>(); in LLVMFuzzerTestOneInput() 161 uint32_t opaqueIdentifier = fdp.ConsumeIntegral<uint32_t>(); in LLVMFuzzerTestOneInput() 162 int32_t opaqueValue = fdp.ConsumeIntegral<int32_t>(); in LLVMFuzzerTestOneInput() [all …]
|
/packages/modules/Bluetooth/system/embdrv/g722/fuzzer/ |
D | g722_fuzzer.cc | 23 uint32_t get_rate_from_fdp(FuzzedDataProvider* fdp) { in get_rate_from_fdp() argument 24 uint32_t rate = fdp->ConsumeIntegralInRange<uint32_t>( in get_rate_from_fdp() 36 void fuzz_encode(FuzzedDataProvider* fdp) { in fuzz_encode() argument 37 uint32_t rate = get_rate_from_fdp(fdp); in fuzz_encode() 38 std::vector<uint8_t> buff = fdp->ConsumeRemainingBytes<uint8_t>(); in fuzz_encode() 87 void fuzz_decode(FuzzedDataProvider* fdp) { in fuzz_decode() argument 89 uint32_t rate = get_rate_from_fdp(fdp); in fuzz_decode() 90 int options = fdp->ConsumeIntegral<int>(); in fuzz_decode() 91 uint16_t gain = fdp->ConsumeIntegral<uint16_t>(); in fuzz_decode() 97 std::vector<uint8_t> encoded_input = fdp->ConsumeRemainingBytes<uint8_t>(); in fuzz_decode() [all …]
|
/packages/modules/Bluetooth/system/stack/fuzzers/ |
D | sdp_fuzzer.cc | 151 static void FuzzAsServer(FuzzedDataProvider& fdp) { in FuzzAsServer() argument 155 auto rec_num = fdp.ConsumeIntegralInRange<uint8_t>(0, 10); in FuzzAsServer() 158 auto attr_num = fdp.ConsumeIntegralInRange<uint8_t>(0, 10); in FuzzAsServer() 161 : fdp.ConsumeIntegral<uint16_t>(); in FuzzAsServer() 162 auto type = fdp.ConsumeIntegral<uint8_t>(); in FuzzAsServer() 163 auto len = fdp.ConsumeIntegralInRange<uint16_t>(1, 512); in FuzzAsServer() 164 auto data = fdp.ConsumeBytes<uint8_t>(len); in FuzzAsServer() 181 while (fdp.remaining_bytes() > 0) { in FuzzAsServer() 182 auto size = fdp.ConsumeIntegralInRange<uint16_t>(0, 1024); in FuzzAsServer() 183 auto bytes = fdp.ConsumeBytes<uint8_t>(size); in FuzzAsServer() [all …]
|
D | gatt_fuzzer.cc | 225 static void FuzzAsServer(FuzzedDataProvider& fdp) { in FuzzAsServer() argument 230 while (fdp.remaining_bytes() > 0) { in FuzzAsServer() 231 auto size = fdp.ConsumeIntegralInRange<uint16_t>(0, kMaxPacketSize); in FuzzAsServer() 232 auto bytes = fdp.ConsumeBytes<uint8_t>(size); in FuzzAsServer() 254 static void FuzzAsClient(FuzzedDataProvider& fdp) { in FuzzAsClient() argument 259 while (fdp.remaining_bytes() > 0) { in FuzzAsClient() 260 auto op = fdp.ConsumeIntegral<uint8_t>(); in FuzzAsClient() 263 auto mtu = fdp.ConsumeIntegral<uint16_t>(); in FuzzAsClient() 268 auto type = (tGATT_DISC_TYPE)fdp.ConsumeIntegralInRange<uint8_t>( in FuzzAsClient() 270 uint16_t start = fdp.ConsumeIntegral<uint16_t>(); in FuzzAsClient() [all …]
|
/packages/modules/Bluetooth/system/audio_hal_interface/fuzzer/ |
D | libbt_audio_hal_le_audio_software_fuzzer.cpp | 53 FuzzedDataProvider fdp(data, size); in LLVMFuzzerTestOneInput() local 55 fdp.PickValueInArray({"true", "false"})); in LLVMFuzzerTestOneInput() 56 std::string name = fdp.ConsumeRandomLengthString(kRandomStringLength); in LLVMFuzzerTestOneInput() 70 uint16_t delay = fdp.ConsumeIntegral<uint16_t>(); in LLVMFuzzerTestOneInput() 73 params.data_interval_us = fdp.ConsumeIntegralInRange<uint32_t>( in LLVMFuzzerTestOneInput() 75 params.sample_rate = fdp.PickValueInArray(kSampleRates); in LLVMFuzzerTestOneInput() 76 params.bits_per_sample = fdp.PickValueInArray(kBitsPerSample); in LLVMFuzzerTestOneInput() 77 params.channels_count = fdp.PickValueInArray(kChannelCount); in LLVMFuzzerTestOneInput() 90 uint16_t delay = fdp.ConsumeIntegral<uint16_t>(); in LLVMFuzzerTestOneInput() 93 params.data_interval_us = fdp.ConsumeIntegralInRange<uint32_t>( in LLVMFuzzerTestOneInput() [all …]
|
D | libbt_audio_hal_hearing_aid_software_encoding_fuzzer.cpp | 50 FuzzedDataProvider fdp(data, size); in LLVMFuzzerTestOneInput() local 55 osi_property_set(property.c_str(), fdp.PickValueInArray({"true", "false"})); in LLVMFuzzerTestOneInput() 59 auto binder = getRandomBinder(&fdp); in LLVMFuzzerTestOneInput() 64 if (fdp.ConsumeBool()) { in LLVMFuzzerTestOneInput() 65 uint16_t delay = fdp.ConsumeIntegral<uint16_t>(); in LLVMFuzzerTestOneInput() 68 std::string name = fdp.ConsumeRandomLengthString(kRandomStringLength); in LLVMFuzzerTestOneInput() 76 std::vector<uint8_t> buffer = fdp.ConsumeBytes<uint8_t>(kMaxBytes); in LLVMFuzzerTestOneInput()
|
D | libbt_audio_hal_a2dp_encoding_fuzzer.cpp | 80 FuzzedDataProvider fdp(data, size); in process() local 82 mCodec = A2dpCodecConfig::createCodec(fdp.PickValueInArray(kCodecIndices)); in process() 86 fdp.PickValueInArray({"true", "false"})); in process() 88 std::string name = fdp.ConsumeRandomLengthString(kRandomStringLength); in process() 93 uint16_t delayReport = fdp.ConsumeIntegral<uint16_t>(); in process() 106 tA2DP_CTRL_ACK status = fdp.PickValueInArray(kCtrlAckStatus); in process() 112 status = fdp.PickValueInArray(kCtrlAckStatus); in process()
|
/packages/modules/DnsResolver/tests/fuzzer/ |
D | resolv_getaddrinfo_fuzzer.cpp | 12 void TestResolvGetaddrinfo(FuzzedDataProvider& fdp) { in TestResolvGetaddrinfo() argument 13 std::string hostname = fdp.ConsumeRandomLengthString(MAXHOSTNAMELEN); in TestResolvGetaddrinfo() 14 std::string servname = fdp.ConsumeRandomLengthString(MAXHOSTNAMELEN); in TestResolvGetaddrinfo() 16 int af = fdp.ConsumeIntegralInRange<int>(0, AF_MAX); in TestResolvGetaddrinfo() 17 int socktype = RandomSocketType(fdp); in TestResolvGetaddrinfo() 22 resolv_getaddrinfo(hostname.c_str(), fdp.ConsumeBool() ? servname.c_str() : nullptr, in TestResolvGetaddrinfo() 23 fdp.ConsumeBool() ? &hints : nullptr, &mNetContext, &result, &event); in TestResolvGetaddrinfo() 40 FuzzedDataProvider fdp(data, size); in LLVMFuzzerTestOneInput() local 44 if (fdp.ConsumeBool()) parcel.tlsServers = {}; in LLVMFuzzerTestOneInput() 47 TestResolvGetaddrinfo(fdp); in LLVMFuzzerTestOneInput()
|
D | resolv_gethostbyaddr_fuzzer.cpp | 7 void TestResolvGethostbyaddr(FuzzedDataProvider& fdp) { in TestResolvGethostbyaddr() argument 9 fdp.ConsumeBool() ? fdp.ConsumeData(&v6addr, sizeof(v6addr)) // Fuzzing data. in TestResolvGethostbyaddr() 12 socklen_t mAddressLen = fdp.ConsumeIntegralInRange<int>(0, NS_IN6ADDRSZ + 1); in TestResolvGethostbyaddr() 14 int af = fdp.ConsumeIntegralInRange<int>(0, AF_MAX); in TestResolvGethostbyaddr() 29 FuzzedDataProvider fdp(data, size); in LLVMFuzzerTestOneInput() local 33 if (fdp.ConsumeBool()) parcel.tlsServers = {}; in LLVMFuzzerTestOneInput() 36 TestResolvGethostbyaddr(fdp); in LLVMFuzzerTestOneInput()
|
D | resolv_gethostbyname_fuzzer.cpp | 12 void TestResolvGethostbyname(FuzzedDataProvider& fdp) { in TestResolvGethostbyname() argument 13 std::string hostname = fdp.ConsumeRandomLengthString(MAXHOSTNAMELEN); in TestResolvGethostbyname() 15 int af = fdp.ConsumeIntegralInRange<int>(0, AF_MAX); in TestResolvGethostbyname() 21 resolv_gethostbyname(fdp.ConsumeBool() ? hostname.c_str() : nullptr, af, &hbuf, tmpbuf, in TestResolvGethostbyname() 30 FuzzedDataProvider fdp(data, size); in LLVMFuzzerTestOneInput() local 34 if (fdp.ConsumeBool()) parcel.tlsServers = {}; in LLVMFuzzerTestOneInput() 37 TestResolvGethostbyname(fdp); in LLVMFuzzerTestOneInput()
|
/packages/modules/Bluetooth/system/stack/test/fuzzers/common/ |
D | commonFuzzHelpers.h | 31 FuzzedDataProvider* fdp, in callArbitraryFunction() argument 35 fdp->ConsumeIntegralInRange<uint8_t>(0, ops_vector.size() - 1); in callArbitraryFunction() 38 ops_vector[function_id](fdp); in callArbitraryFunction() 42 T getArbitraryVectorElement(FuzzedDataProvider* fdp, std::vector<T> vect, in getArbitraryVectorElement() argument 46 if (vect.empty() || (allow_null && fdp->ConsumeBool())) { in getArbitraryVectorElement() 51 return vect.at(fdp->ConsumeIntegralInRange<size_t>(0, vect.size() - 1)); in getArbitraryVectorElement() 54 RawAddress generateRawAddress(FuzzedDataProvider* fdp) { in generateRawAddress() argument 63 std::vector<uint8_t> bytes = fdp->ConsumeBytes<uint8_t>(retval.kLength); in generateRawAddress() 69 bluetooth::Uuid generateArbitraryUuid(FuzzedDataProvider* fdp) { in generateArbitraryUuid() argument 71 fdp->ConsumeBytes<uint8_t>(bluetooth::Uuid::kNumBytes128); in generateArbitraryUuid()
|
/packages/services/Car/cpp/evs/manager/aidl/tests/fuzz/ |
D | HalCameraFuzzer.cpp | 75 FuzzedDataProvider fdp(data, size); in LLVMFuzzerTestOneInput() local 88 while (fdp.remaining_bytes() > kMaxFuzzerConsumedBytes) { in LLVMFuzzerTestOneInput() 89 switch (fdp.ConsumeIntegralInRange<uint32_t>(0, EVS_FUZZ_API_SUM)) { in LLVMFuzzerTestOneInput() 100 fdp.ConsumeIntegralInRange<uint32_t>(0, virtualCameras.size() - 1); in LLVMFuzzerTestOneInput() 109 fdp.ConsumeIntegralInRange<uint32_t>(0, virtualCameras.size() - 1); in LLVMFuzzerTestOneInput() 136 uint32_t delta = fdp.ConsumeIntegral<int32_t>(); in LLVMFuzzerTestOneInput() 151 fdp.ConsumeIntegralInRange<uint32_t>(0, virtualCameras.size() - 1); in LLVMFuzzerTestOneInput() 165 fdp.ConsumeIntegralInRange<uint32_t>(0, virtualCameras.size() - 1); in LLVMFuzzerTestOneInput() 174 fdp.ConsumeIntegralInRange<uint32_t>(0, buffers.size() - 1); in LLVMFuzzerTestOneInput() 184 fdp.ConsumeIntegralInRange<uint32_t>(0, virtualCameras.size() - 1); in LLVMFuzzerTestOneInput() [all …]
|
D | VirtualCameraFuzzer.cpp | 67 FuzzedDataProvider fdp(data, size); in LLVMFuzzerTestOneInput() local 83 while (fdp.remaining_bytes() > kMaxFuzzerConsumedBytes) { in LLVMFuzzerTestOneInput() 84 switch (fdp.ConsumeIntegralInRange<uint32_t>(0, EVS_FUZZ_API_SUM)) { in LLVMFuzzerTestOneInput() 110 uint32_t type = fdp.ConsumeIntegralInRange< in LLVMFuzzerTestOneInput() 120 buffer.bufferId = fdp.ConsumeIntegral<int32_t>(); in LLVMFuzzerTestOneInput() 133 uint32_t delta = fdp.ConsumeIntegral<uint32_t>(); in LLVMFuzzerTestOneInput() 153 fdp.ConsumeIntegralInRange<uint32_t>(0, buffers.size() - 1); in LLVMFuzzerTestOneInput() 169 uint32_t opaqueIdentifier = fdp.ConsumeIntegral<uint32_t>(); in LLVMFuzzerTestOneInput() 176 uint32_t opaqueIdentifier = fdp.ConsumeIntegral<uint32_t>(); in LLVMFuzzerTestOneInput() 178 *reinterpret_cast<uint32_t*>(value.data()) = fdp.ConsumeIntegral<int32_t>(); in LLVMFuzzerTestOneInput() [all …]
|
/packages/modules/Bluetooth/system/gd/l2cap/fuzz/ |
D | fuzz_l2cap.cc | 50 FuzzedDataProvider fdp = FuzzedDataProvider(data, size); in LLVMFuzzerTestOneInput() local 51 ShimL2capFuzz l2shim(&fdp); in LLVMFuzzerTestOneInput() 53 std::vector<uint8_t> addressVals = fdp.ConsumeBytes<uint8_t>(Address::kLength); in LLVMFuzzerTestOneInput() 70 [[maybe_unused]] uint16_t psm = fdp.ConsumeIntegralInRange<uint16_t>(0x0001, 0x007F); in LLVMFuzzerTestOneInput() 72 uint16_t dynamicPsm = fdp.ConsumeIntegralInRange<uint16_t>(0x0080, 0x00FF); in LLVMFuzzerTestOneInput() 84 …Cid dynamicCid = fdp.ConsumeIntegralInRange<uint16_t>(l2cap::kFirstDynamicChannel, l2cap::kLastDyn… in LLVMFuzzerTestOneInput() 88 while (fdp.remaining_bytes() > 0) { in LLVMFuzzerTestOneInput() 90 bool dynamic = fdp.ConsumeBool(); in LLVMFuzzerTestOneInput() 94 …static_cast<uint16_t>(std::min(static_cast<size_t>(fdp.ConsumeIntegral<uint16_t>()), fdp.remaining… in LLVMFuzzerTestOneInput() 95 std::vector<uint8_t> data = fdp.ConsumeBytes<uint8_t>(packetSize); in LLVMFuzzerTestOneInput()
|