Home
last modified time | relevance | path

Searched refs:mFdp (Results 1 – 25 of 35) sorted by relevance

12

/frameworks/native/libs/gui/fuzzer/
Dlibgui_parcelable_fuzzer.cpp47 ParcelableFuzzer(const uint8_t* data, size_t size) : mFdp(data, size){}; in ParcelableFuzzer()
57 FuzzedDataProvider mFdp; member in ParcelableFuzzer
62 surface.name = String16((mFdp.ConsumeRandomLengthString(kMaxBytes)).c_str()); in invokeViewSurface()
67 bool nameAlreadyWritten = mFdp.ConsumeBool(); in invokeViewSurface()
70 surface.readFromParcel(&parcel, mFdp.ConsumeBool()); in invokeViewSurface()
77 for (size_t idx1 = 0; idx1 < mFdp.ConsumeIntegral<uint32_t>(); ++idx1) { in invokeLayerMetadata()
78 data.push_back(mFdp.ConsumeIntegral<uint8_t>()); in invokeLayerMetadata()
83 uint32_t key = mFdp.PickValueInArray(kMetadataKey); in invokeLayerMetadata()
84 metadata.setInt32(key, mFdp.ConsumeIntegral<int32_t>()); in invokeLayerMetadata()
85 metadata.itemToString(key, (mFdp.ConsumeRandomLengthString(kMaxBytes)).c_str()); in invokeLayerMetadata()
[all …]
Dlibgui_bufferQueue_fuzzer.cpp48 BufferQueueFuzzer(const uint8_t* data, size_t size) : mFdp(data, size){}; in BufferQueueFuzzer()
66 FuzzedDataProvider mFdp; member in BufferQueueFuzzer
95 uint32_t layerId = mFdp.ConsumeIntegral<uint32_t>(); in makeSurfaceControl()
98 mFdp.ConsumeIntegral<int32_t>(), in makeSurfaceControl()
99 mFdp.ConsumeIntegral<uint32_t>(), in makeSurfaceControl()
100 mFdp.ConsumeIntegral<int32_t>(), in makeSurfaceControl()
101 mFdp.ConsumeIntegral<uint32_t>(), in makeSurfaceControl()
102 mFdp.ConsumeIntegral<uint32_t>()); in makeSurfaceControl()
106 return sp<BLASTBufferQueue>::make(mFdp.ConsumeRandomLengthString(kMaxBytes), surface, in makeBLASTBufferQueue()
107 mFdp.ConsumeIntegral<uint32_t>(), in makeBLASTBufferQueue()
[all …]
Dlibgui_surfaceComposerClient_fuzzer.cpp115 SurfaceComposerClientFuzzer(const uint8_t* data, size_t size) : mFdp(data, size){}; in SurfaceComposerClientFuzzer()
128 FuzzedDataProvider mFdp; member in SurfaceComposerClientFuzzer
134 range.min = mFdp.ConsumeFloatingPoint<float>(); in getDisplayModeSpecs()
135 range.max = mFdp.ConsumeFloatingPoint<float>(); in getDisplayModeSpecs()
146 String8 displayName((mFdp.ConsumeRandomLengthString(kRandomStringMaxBytes)).c_str()); in getDisplayModeSpecs()
148 SurfaceComposerClient::createDisplay(displayName, mFdp.ConsumeBool() /*secure*/); in getDisplayModeSpecs()
150 specs.defaultMode = mFdp.ConsumeIntegral<int32_t>(); in getDisplayModeSpecs()
151 specs.allowGroupSwitching = mFdp.ConsumeBool(); in getDisplayModeSpecs()
158 int32_t left = mFdp.ConsumeIntegral<int32_t>(); in getBlurRegion()
159 int32_t right = mFdp.ConsumeIntegral<int32_t>(); in getBlurRegion()
[all …]
Dlibgui_consumer_fuzzer.cpp29 ConsumerFuzzer(const uint8_t* data, size_t size) : mFdp(data, size){}; in ConsumerFuzzer()
33 FuzzedDataProvider mFdp; member in ConsumerFuzzer
40 uint64_t maxBuffers = mFdp.ConsumeIntegralInRange<uint64_t>(kMinBuffer, kMaxBuffer); in process()
42 new CpuConsumer(consumer, maxBuffers, mFdp.ConsumeBool() /*controlledByApp*/)); in process()
48 uint32_t tex = mFdp.ConsumeIntegral<uint32_t>(); in process()
50 mFdp.ConsumeBool() /*useFenceSync*/, in process()
51 mFdp.ConsumeBool() /*isControlledByApp*/)); in process()
58 new GraphicBuffer(mFdp.ConsumeIntegral<uint32_t>(), mFdp.ConsumeIntegral<uint32_t>(), in process()
59 mFdp.ConsumeIntegral<int32_t>(), mFdp.ConsumeIntegral<uint32_t>(), in process()
60 mFdp.ConsumeIntegral<uint64_t>()); in process()
[all …]
/frameworks/native/services/surfaceflinger/fuzzer/
Dsurfaceflinger_layer_fuzzer.cpp40 LayerFuzzer(const uint8_t* data, size_t size) : mFdp(data, size){}; in LayerFuzzer()
50 FuzzedDataProvider mFdp; member in android::fuzzer::LayerFuzzer
54 return Rect(mFdp.ConsumeIntegral<int32_t>() /*left*/, mFdp.ConsumeIntegral<int32_t>() /*top*/, in getFuzzedRect()
55 mFdp.ConsumeIntegral<int32_t>() /*right*/, in getFuzzedRect()
56 mFdp.ConsumeIntegral<int32_t>() /*bottom*/); in getFuzzedRect()
60 return ui::Transform(mFdp.ConsumeIntegral<int32_t>() /*orientation*/, in getFuzzedTransform()
61 mFdp.ConsumeIntegral<int32_t>() /*width*/, in getFuzzedTransform()
62 mFdp.ConsumeIntegral<int32_t>() /*height*/); in getFuzzedTransform()
67 ftInfo.vsyncId = mFdp.ConsumeIntegral<int64_t>(); in getFuzzedFrameTimelineInfo()
68 ftInfo.inputEventId = mFdp.ConsumeIntegral<int32_t>(); in getFuzzedFrameTimelineInfo()
[all …]
Dsurfaceflinger_scheduler_fuzzer.cpp67 SchedulerFuzzer(const uint8_t* data, size_t size) : mFdp(data, size){}; in SchedulerFuzzer()
85 FuzzedDataProvider mFdp; member in android::fuzz::SchedulerFuzzer
93 PhysicalDisplayId randomDispId = PhysicalDisplayId::fromPort(mFdp.ConsumeIntegral<uint16_t>()); in getPhysicalDisplayId()
95 PhysicalDisplayId displayId = mFdp.PickValueInArray<PhysicalDisplayId>( in getPhysicalDisplayId()
108 (std::chrono::nanoseconds)mFdp.ConsumeIntegral<uint64_t>(), in fuzzEventThread()
109 (std::chrono::nanoseconds)mFdp.ConsumeIntegral<uint64_t>()); in fuzzEventThread()
111 thread->onHotplugReceived(getPhysicalDisplayId(), mFdp.ConsumeBool()); in fuzzEventThread()
113 sp<EventThreadConnection>::make(thread.get(), mFdp.ConsumeIntegral<uint16_t>(), in fuzzEventThread()
116 thread->setVsyncRate(mFdp.ConsumeIntegral<uint32_t>() /*rate*/, connection); in fuzzEventThread()
118 thread->setDuration((std::chrono::nanoseconds)mFdp.ConsumeIntegral<uint64_t>(), in fuzzEventThread()
[all …]
Dsurfaceflinger_displayhardware_fuzzer.cpp118 DisplayHardwareFuzzer(const uint8_t* data, size_t size) : mFdp(data, size) { in DisplayHardwareFuzzer()
120 PhysicalDisplayId::fromPort(mFdp.ConsumeIntegral<uint8_t>())); in DisplayHardwareFuzzer()
159 FuzzedDataProvider mFdp; member in android::fuzz::DisplayHardwareFuzzer
166 composer->validateDisplay(display, mFdp.ConsumeIntegral<nsecs_t>(), &outNumTypes, in validateDisplay()
174 composer->presentOrValidateDisplay(display, mFdp.ConsumeIntegral<nsecs_t>(), &outNumTypes, in presentOrValidateDisplay()
180 composer->setOutputBuffer(display, &buffer, mFdp.ConsumeIntegral<int32_t>() /*releaseFence*/); in setOutputBuffer()
194 composer->createVirtualDisplay(mFdp.ConsumeIntegral<uint32_t>() /*width*/, in createVirtualDisplay()
195 mFdp.ConsumeIntegral<uint32_t>() /*height*/, &format, &display); in createVirtualDisplay()
217 std::string string = mFdp.ConsumeRandomLengthString().c_str(); in dumpHwc()
224 mFdp.ConsumeBool() /*frameUsesClientComposition*/, in getDeviceCompositionChanges()
[all …]
Dsurfaceflinger_fuzzer.cpp105 SurfaceFlingerFuzzer(const uint8_t *data, size_t size) : mFdp(data, size) { in SurfaceFlingerFuzzer()
118 FuzzedDataProvider mFdp; member in android::fuzz::SurfaceFlingerFuzzer
124 mFlinger->setSchedFifo(mFdp.ConsumeBool()); in invokeFlinger()
125 mFlinger->setSchedAttr(mFdp.ConsumeBool()); in invokeFlinger()
127 mFlinger->hasSyncFramework = mFdp.ConsumeBool(); in invokeFlinger()
128 mFlinger->dispSyncPresentTimeOffset = mFdp.ConsumeIntegral<int64_t>(); in invokeFlinger()
129 mFlinger->useHwcForRgbToYuv = mFdp.ConsumeBool(); in invokeFlinger()
130 mFlinger->maxFrameBufferAcquiredBuffers = mFdp.ConsumeIntegral<int64_t>(); in invokeFlinger()
131 mFlinger->maxGraphicsWidth = mFdp.ConsumeIntegral<uint32_t>(); in invokeFlinger()
132 mFlinger->maxGraphicsHeight = mFdp.ConsumeIntegral<uint32_t>(); in invokeFlinger()
[all …]
/frameworks/av/media/mtp/tests/MtpFuzzer/
Dmtp_data_packet_fuzzer.cpp27 MtpDataPacketFuzzer(const uint8_t* data, size_t size) : mFdp(data, size) { in MtpDataPacketFuzzer()
35 FuzzedDataProvider mFdp; member in MtpDataPacketFuzzer
40 while (mFdp.remaining_bytes() > 0) { in process()
41 auto mtpDataAPI = mFdp.PickValueInArray<const std::function<void()>>({ in process()
42 [&]() { mtpDataPacket.allocate(mFdp.ConsumeIntegralInRange(kMinSize, kMaxSize)); }, in process()
45 mtpDataPacket.setOperationCode(mFdp.ConsumeIntegralInRange(kMinSize, kMaxSize)); in process()
48 mtpDataPacket.setTransactionID(mFdp.ConsumeIntegralInRange(kMinSize, kMaxSize)); in process()
83 if (mFdp.ConsumeBool()) { in process()
85 mFdp.ConsumeBytes<uint8_t>(mFdp.ConsumeIntegral<uint8_t>()); in process()
92 if (mFdp.ConsumeBool()) { in process()
[all …]
Dmtp_property_fuzzer.cpp36 MtpPropertyFuzzer(const uint8_t* data, size_t size) : mFdp(data, size) { in MtpPropertyFuzzer()
44 FuzzedDataProvider mFdp; member in MtpPropertyFuzzer
49 if (mFdp.ConsumeBool()) { in process()
52 uint16_t type = mFdp.ConsumeBool() ? mFdp.ConsumeIntegral<uint16_t>() in process()
53 : mFdp.PickValueInArray<uint16_t>(kFeasibleTypes); in process()
54 mtpProperty = new MtpProperty(mFdp.ConsumeIntegral<uint16_t>(), type, mFdp.ConsumeBool(), in process()
55 mFdp.ConsumeIntegral<uint16_t>()); in process()
58 while (mFdp.remaining_bytes() > 0) { in process()
59 auto invokeMtpPropertyFuzzer = mFdp.PickValueInArray<const std::function<void()>>({ in process()
62 if (mFdp.ConsumeBool()) { in process()
[all …]
Dmtp_packet_fuzzer.cpp26 MtpPacketFuzzer(const uint8_t* data, size_t size) : mFdp(data, size) { in MtpPacketFuzzer()
34 FuzzedDataProvider mFdp; member in MtpPacketFuzzer
38 MtpPacket mtpPacket(mFdp.ConsumeIntegralInRange<size_t>(kMinSize, kMaxSize)); /*bufferSize*/ in process()
39 while (mFdp.remaining_bytes() > 0) { in process()
40 auto mtpPacketAPI = mFdp.PickValueInArray<const std::function<void()>>({ in process()
42 mtpPacket.allocate(mFdp.ConsumeIntegralInRange<size_t>(kMinSize, kMaxSize)); in process()
51 mFdp.ConsumeIntegralInRange<int32_t>(kMinSize, kMaxSize)); in process()
55 mFdp.ConsumeIntegralInRange<int32_t>(kMinSize, kMaxSize)); in process()
59 mFdp.ConsumeIntegralInRange<int32_t>(kMinSize, kMaxSize)); in process()
63 mFdp.ConsumeIntegralInRange<int32_t>(kMinSize, kMaxSize), in process()
[all …]
Dmtp_fuzzer.cpp51 MtpMockServer(const uint8_t* data, size_t size) : mFdp(data, size) { in MtpMockServer()
57 mFdp.ConsumeIntegral<uint32_t>() /* storageId */, storage_path, in MtpMockServer()
58 mFdp.ConsumeRandomLengthString(kMaxBytes).c_str() /* descriptor */, in MtpMockServer()
59 mFdp.ConsumeBool() /* removable */, in MtpMockServer()
60 mFdp.ConsumeIntegral<uint64_t>() /* maxFileSize */); in MtpMockServer()
67 mDatabase.get(), controlFd, mFdp.ConsumeBool() /* ptp */, in MtpMockServer()
68 mFdp.ConsumeRandomLengthString(kMaxBytes).c_str() /* manu */, in MtpMockServer()
69 mFdp.ConsumeRandomLengthString(kMaxBytes).c_str() /* model */, in MtpMockServer()
70 mFdp.ConsumeRandomLengthString(kMaxBytes).c_str() /* version */, in MtpMockServer()
71 mFdp.ConsumeRandomLengthString(kMaxBytes).c_str() /* serial */); in MtpMockServer()
[all …]
Dmtp_event_packet_fuzzer.cpp26 MtpEventPacketFuzzer(const uint8_t* data, size_t size) : mFdp(data, size) { in MtpEventPacketFuzzer()
34 FuzzedDataProvider mFdp; member in MtpEventPacketFuzzer
39 while (mFdp.remaining_bytes() > 0) { in process()
40 auto mtpEventAPI = mFdp.PickValueInArray<const std::function<void()>>({ in process()
41 [&]() { mtpEventPacket.allocate(mFdp.ConsumeIntegralInRange(kMinSize, kMaxSize)); }, in process()
43 [&]() { writeHandle(&mtpEventPacket, &mFdp); }, in process()
45 fillFilePath(&mFdp); in process()
47 fillUsbRequest(fd, &mFdp); in process()
53 fillFilePath(&mFdp); in process()
55 fillFd(fd, &mFdp); in process()
Dmtp_request_packet_fuzzer.cpp30 MtpRequestPacketFuzzer(const uint8_t* data, size_t size) : mFdp(data, size) { in MtpRequestPacketFuzzer()
38 FuzzedDataProvider mFdp; member in MtpRequestPacketFuzzer
44 while (mFdp.remaining_bytes() > 0) { in process()
45 auto mtpRequestAPI = mFdp.PickValueInArray<const std::function<void()>>({ in process()
47 mtpRequestPacket.allocate(mFdp.ConsumeIntegralInRange(kMinSize, kMaxSize)); in process()
53 handle.start(mFdp.ConsumeBool()); in process()
54 std::vector<uint8_t> data = mFdp.ConsumeBytes<uint8_t>( in process()
55 mFdp.ConsumeIntegralInRange<size_t>(kMinSize, kMaxSize)); in process()
62 fillFilePath(&mFdp); in process()
64 fillUsbRequest(fd, &mFdp); in process()
[all …]
/frameworks/av/media/libaudioclient/fuzzer/
Daudioflinger_fuzzer.cpp195 FuzzedDataProvider mFdp; member in AudioFlingerFuzzer
207 AudioFlingerFuzzer::AudioFlingerFuzzer(const uint8_t *data, size_t size) : mFdp(data, size) { in AudioFlingerFuzzer()
218 uint32_t sampleRate = getSampleRate(&mFdp); in invokeAudioTrack()
219 audio_format_t format = getValue(&mFdp, kFormats); in invokeAudioTrack()
220 audio_channel_mask_t channelMask = getValue(&mFdp, kChannelMasks); in invokeAudioTrack()
221 size_t frameCount = static_cast<size_t>(mFdp.ConsumeIntegral<uint32_t>()); in invokeAudioTrack()
222 int32_t notificationFrames = mFdp.ConsumeIntegral<int32_t>(); in invokeAudioTrack()
223 uint32_t useSharedBuffer = mFdp.ConsumeBool(); in invokeAudioTrack()
224 audio_output_flags_t flags = getValue(&mFdp, kOutputFlags); in invokeAudioTrack()
225 audio_session_t sessionId = getValue(&mFdp, kSessionId); in invokeAudioTrack()
[all …]
/frameworks/av/media/ndk/fuzzer/
Dndk_drm_fuzzer.cpp69 NdkMediaDrmFuzzer(const uint8_t* data, size_t size) : mFdp(data, size){}; in NdkMediaDrmFuzzer()
100 FuzzedDataProvider mFdp; member in NdkMediaDrmFuzzer
112 uint32_t uuidEnum = mFdp.ConsumeEnum<MediaUUID>(); in invokeDrmCreatePlugin()
142 int32_t setListenerAPI = mFdp.ConsumeIntegralInRange<size_t>(kMinAPIcase, kMaxsetListenerAPIs); in invokeDrmSetListener()
161 int32_t propertyAPI = mFdp.ConsumeIntegralInRange<size_t>(kMinAPIcase, kMaxpropertyAPIs); in invokeDrmPropertyAPI()
166 mFdp.ConsumeBool() ? kPropertyName : mFdp.ConsumeRandomLengthString(kMaxBytes); in invokeDrmPropertyAPI()
174 mFdp.ConsumeBool() ? kPropertyName : mFdp.ConsumeRandomLengthString(kMaxBytes); in invokeDrmPropertyAPI()
180 std::string propertyName = mFdp.ConsumeRandomLengthString(kMaxBytes); in invokeDrmPropertyAPI()
181 std::string value = mFdp.ConsumeRandomLengthString(kMaxBytes); in invokeDrmPropertyAPI()
188 std::string propertyName = mFdp.ConsumeRandomLengthString(kMaxBytes); in invokeDrmPropertyAPI()
[all …]
DNdkMediaCodecFuzzerBase.cpp227 name = mFdp->ConsumeBool() ? mFdp->PickValueInArray(kEncoderNames) in createAMediaCodecByname()
228 : mFdp->ConsumeRandomLengthString(kMaxBytes); in createAMediaCodecByname()
230 name = mFdp->ConsumeBool() ? mFdp->PickValueInArray(kDecoderNames) in createAMediaCodecByname()
231 : mFdp->ConsumeRandomLengthString(kMaxBytes); in createAMediaCodecByname()
235 pid_t pid = mFdp->ConsumeIntegral<pid_t>(); in createAMediaCodecByname()
236 uid_t uid = mFdp->ConsumeIntegral<uid_t>(); in createAMediaCodecByname()
249 if (mFdp->ConsumeBool()) { in createAMediaCodecByType()
250 mimeType = mFdp->ConsumeRandomLengthString(kMaxBytes); in createAMediaCodecByType()
257 pid_t pid = mFdp->ConsumeIntegral<pid_t>(); in createAMediaCodecByType()
258 uid_t uid = mFdp->ConsumeIntegral<uid_t>(); in createAMediaCodecByType()
[all …]
Dndk_extractor_fuzzer.cpp35 NdkExtractorFuzzer(const uint8_t* data, size_t size) : mFdp(data, size) { in NdkExtractorFuzzer()
37 std::vector<char> dataBuffer = mFdp.ConsumeBytes<char>( in NdkExtractorFuzzer()
38 mFdp.ConsumeIntegralInRange<int32_t>(kMinDataSizeFactor * size, size)); in NdkExtractorFuzzer()
51 FuzzedDataProvider mFdp; member in NdkExtractorFuzzer
63 if (mFdp.ConsumeBool()) { in process()
76 while (mFdp.remaining_bytes() && count++ < kMaxIterations) { in process()
77 switch (mFdp.ConsumeIntegralInRange<int32_t>(kCaseStart, kCaseEnd)) { in process()
80 mFdp.ConsumeIntegral<size_t>() /* idx */); in process()
85 mFdp.ConsumeIntegral<size_t>() /* idx */); in process()
94 mFdp.ConsumeIntegralInRange<size_t>(0, sampleSize) /* capacity */); in process()
[all …]
Dndk_sync_codec_fuzzer.cpp23 : NdkMediaCodecFuzzerBase(), mFdp(data, size) { in NdkSyncCodecFuzzer()
24 setFdp(&mFdp); in NdkSyncCodecFuzzer()
37 FuzzedDataProvider mFdp; member in NdkSyncCodecFuzzer
44 int32_t numOfFrames = mFdp.ConsumeIntegralInRange<size_t>(kMinIterations, kMaxIterations); in invokekSyncCodecAPIs()
47 int32_t ndkcodecAPI = mFdp.ConsumeIntegralInRange<size_t>(kMinAPICase, kMaxNdkCodecAPIs); in invokekSyncCodecAPIs()
87 mFdp.ConsumeIntegralInRange<size_t>(kMinIntKeyValue, kMaxIntKeyValue)); in invokekSyncCodecAPIs()
94 if (mFdp.ConsumeBool()) { in invokekSyncCodecAPIs()
106 std::vector<uint8_t> userData = mFdp.ConsumeBytes<uint8_t>( in invokekSyncCodecAPIs()
107 mFdp.ConsumeIntegralInRange<size_t>(kMinBytes, kMaxBytes)); in invokekSyncCodecAPIs()
124 while (mFdp.remaining_bytes() > 0) { in invokeSyncCodeConfigAPI()
[all …]
/frameworks/native/services/inputflinger/tests/fuzzers/
DMapperHelpers.h81 std::shared_ptr<ThreadSafeFuzzedDataProvider> mFdp; variable
84 FuzzEventHub(std::shared_ptr<ThreadSafeFuzzedDataProvider> fdp) : mFdp(std::move(fdp)) {} in FuzzEventHub()
89 return ftl::Flags<InputDeviceClass>(mFdp->ConsumeIntegral<uint32_t>()); in getDeviceClasses()
95 return mFdp->ConsumeIntegral<int32_t>(); in getDeviceControllerNumber()
102 return mFdp->ConsumeIntegral<status_t>(); in getAbsoluteAxisInfo()
104 bool hasRelativeAxis(int32_t deviceId, int axis) const override { return mFdp->ConsumeBool(); } in hasRelativeAxis()
106 return mFdp->ConsumeBool(); in hasInputProperty()
108 bool hasMscEvent(int32_t deviceId, int mscEvent) const override { return mFdp->ConsumeBool(); } in hasMscEvent()
111 return mFdp->ConsumeIntegral<status_t>(); in mapKey()
114 return mFdp->ConsumeIntegral<status_t>(); in mapAxis()
[all …]
/frameworks/av/media/libmediaplayerservice/fuzzer/
Dmediaplayer_fuzzer.cpp151 : mFdp(data, size), mDataSourceFd(memfd_create("InputFile", MFD_ALLOW_SEALING)){}; in MediaPlayerServiceFuzzer()
158 FuzzedDataProvider mFdp; member in MediaPlayerServiceFuzzer
167 switch (mFdp.ConsumeEnum<DataSourceType>()) { in setDataSource()
170 headers.add(String8(mFdp.ConsumeRandomLengthString().c_str()), in setDataSource()
171 String8(mFdp.ConsumeRandomLengthString().c_str())); in setDataSource()
173 uint32_t dataBlobSize = mFdp.ConsumeIntegralInRange<uint16_t>(0, size); in setDataSource()
174 vector<uint8_t> uriSuffix = mFdp.ConsumeBytes<uint8_t>(dataBlobSize); in setDataSource()
176 string uri(mFdp.PickValueInArray(kUrlPrefix)); in setDataSource()
209 String8 rtpParams = String8(mFdp.ConsumeRandomLengthString().c_str()); in setDataSource()
211 endpoint.sin_family = mFdp.ConsumeIntegral<unsigned short>(); in setDataSource()
[all …]
Dmetadataretriever_fuzzer.cpp62 : mFdp(data, size), in MetadataRetrieverFuzzer()
70 FuzzedDataProvider mFdp; member in MetadataRetrieverFuzzer
76 int64_t timeUs = mFdp.ConsumeIntegral<int64_t>(); in getData()
77 int32_t option = mFdp.ConsumeIntegral<int32_t>(); in getData()
78 int32_t colorFormat = mFdp.ConsumeIntegral<int32_t>(); in getData()
79 bool metaOnly = mFdp.ConsumeBool(); in getData()
82 int32_t index = mFdp.ConsumeIntegral<int32_t>(); in getData()
83 colorFormat = mFdp.ConsumeIntegral<int32_t>(); in getData()
84 metaOnly = mFdp.ConsumeBool(); in getData()
85 bool thumbnail = mFdp.ConsumeBool(); in getData()
[all …]
Dmediarecorder_fuzzer.cpp185 FuzzedDataProvider mFdp; member in MediaRecorderClientFuzzer
197 int32_t deviceId = mFdp.ConsumeIntegral<int32_t>(); in getConfig()
219 args.push_back(String16(mFdp.ConsumeRandomLengthString().c_str())); in dumpInfo()
226 mStfRecorder->setAudioSource(mFdp.PickValueInArray(kSupportedAudioSources)); in setConfig()
227 mStfRecorder->setVideoSource(mFdp.PickValueInArray(kSupportedVideoSources)); in setConfig()
229 mFdp.PickValueInArray(kSupportedMicrophoneDirections)); in setConfig()
230 mStfRecorder->setPrivacySensitive(mFdp.ConsumeBool()); in setConfig()
233 mStfRecorder->setVideoSize(mFdp.ConsumeIntegralInRange<int32_t>(kMinVideoSize, kMaxVideoSize), in setConfig()
234 mFdp.ConsumeIntegralInRange<int32_t>(kMinVideoSize, kMaxVideoSize)); in setConfig()
235 mStfRecorder->setVideoFrameRate(mFdp.ConsumeIntegral<int32_t>()); in setConfig()
[all …]
/frameworks/av/services/audiopolicy/fuzzer/
Daudiopolicy_fuzzer.cpp222 FuzzedDataProvider *mFdp; member in AudioPolicyManagerFuzzer
226 : mFdp(fdp) {} in AudioPolicyManagerFuzzer()
229 if (mFdp->remaining_bytes() < 1) { in initialize()
354 patch.id = mFdp->ConsumeIntegral<uint32_t>(); in createFuzzedPatch()
355 patch.num_sources = mFdp->ConsumeIntegralInRange(0, AUDIO_PATCH_PORTS_MAX); in createFuzzedPatch()
358 std::vector<uint8_t> bytes = mFdp->ConsumeBytes<uint8_t>(sizeof(config)); in createFuzzedPatch()
362 patch.num_sinks = mFdp->ConsumeIntegralInRange(0, AUDIO_PATCH_PORTS_MAX); in createFuzzedPatch()
365 std::vector<uint8_t> bytes = mFdp->ConsumeBytes<uint8_t>(sizeof(config)); in createFuzzedPatch()
373 if (mFdp->remaining_bytes()) { in fuzzPatchCreation()
375 uid_t uid = mFdp->ConsumeIntegral<uint32_t>(); in fuzzPatchCreation()
[all …]
/frameworks/av/media/libstagefright/colorconversion/fuzzer/
Dcolor_conversion_fuzzer.cpp43 ColorConversionFuzzer(const uint8_t* data, size_t size) : mFdp(data, size){}; in ColorConversionFuzzer()
47 FuzzedDataProvider mFdp; member in ColorConversionFuzzer
87 static_cast<OMX_COLOR_FORMATTYPE>(mFdp.PickValueInArray(kSrcFormatType)); in process()
89 static_cast<OMX_COLOR_FORMATTYPE>(mFdp.PickValueInArray(kDstFormatType)); in process()
93 width = mFdp.ConsumeIntegralInRange<int32_t>(kMinFrameSize, kMaxFrameSize); in process()
94 height = mFdp.ConsumeIntegralInRange<int32_t>(kMinFrameSize, kMaxFrameSize); in process()
95 stride = mFdp.ConsumeIntegralInRange<int32_t>(width, 2 * kMaxFrameSize); in process()
97 srcLeft = mFdp.ConsumeIntegralInRange<int32_t>(0, width - 1); in process()
98 srcTop = mFdp.ConsumeIntegralInRange<int32_t>(0, height - 1); in process()
99 srcRight = mFdp.ConsumeIntegralInRange<int32_t>(srcLeft, width - 1); in process()
[all …]

12