Lines Matching refs:fdp
26 static void addProperty(FuzzEventHub& eventHub, std::shared_ptr<ThreadSafeFuzzedDataProvider> fdp) { in addProperty() argument
28 fdp->PickValueInArray<std::function<void()>>( in addProperty()
32 fdp->ConsumeRandomLengthString(100).data()); in addProperty()
36 fdp->ConsumeRandomLengthString(100).data()); in addProperty()
40 fdp->ConsumeRandomLengthString(100).data()); in addProperty()
45 std::shared_ptr<ThreadSafeFuzzedDataProvider> fdp = in LLVMFuzzerTestOneInput() local
49 std::shared_ptr<FuzzEventHub> eventHub = std::make_shared<FuzzEventHub>(fdp); in LLVMFuzzerTestOneInput()
50 FuzzInputReaderContext context(eventHub, fdp); in LLVMFuzzerTestOneInput()
51 InputDevice device = getFuzzedInputDevice(*fdp, &context); in LLVMFuzzerTestOneInput()
55 KeyboardInputMapper>(*fdp.get(), device, InputReaderConfiguration{}, in LLVMFuzzerTestOneInput()
56 /*source=*/fdp->ConsumeIntegral<uint32_t>()); in LLVMFuzzerTestOneInput()
59 while (fdp->remaining_bytes() > 0) { in LLVMFuzzerTestOneInput()
60 fdp->PickValueInArray<std::function<void()>>({ in LLVMFuzzerTestOneInput()
61 [&]() -> void { addProperty(*eventHub.get(), fdp); }, in LLVMFuzzerTestOneInput()
73 mapper.reconfigure(fdp->ConsumeIntegral<nsecs_t>(), /*readerConfig=*/{}, in LLVMFuzzerTestOneInput()
75 fdp->ConsumeIntegral<uint32_t>())); in LLVMFuzzerTestOneInput()
78 std::list<NotifyArgs> unused = mapper.reset(fdp->ConsumeIntegral<nsecs_t>()); in LLVMFuzzerTestOneInput()
81 RawEvent rawEvent = getFuzzedRawEvent(*fdp); in LLVMFuzzerTestOneInput()
85 mapper.getKeyCodeState(fdp->ConsumeIntegral<uint32_t>(), in LLVMFuzzerTestOneInput()
86 fdp->ConsumeIntegral<int32_t>()); in LLVMFuzzerTestOneInput()
89 mapper.getScanCodeState(fdp->ConsumeIntegral<uint32_t>(), in LLVMFuzzerTestOneInput()
90 fdp->ConsumeIntegral<int32_t>()); in LLVMFuzzerTestOneInput()
94 int32_t numBytes = fdp->ConsumeIntegralInRange<int32_t>(0, kMaxKeycodes); in LLVMFuzzerTestOneInput()
96 keyCodes.push_back(fdp->ConsumeIntegral<int32_t>()); in LLVMFuzzerTestOneInput()
98 mapper.markSupportedKeyCodes(fdp->ConsumeIntegral<uint32_t>(), keyCodes, in LLVMFuzzerTestOneInput()
102 [&]() -> void { mapper.updateMetaState(fdp->ConsumeIntegral<int32_t>()); }, in LLVMFuzzerTestOneInput()