/frameworks/av/camera/tests/fuzzer/ |
D | camera_Parameters_fuzzer.cpp | 51 FuzzedDataProvider* mFDP = nullptr; member in CameraParametersFuzzer 56 if (mFDP->ConsumeBool()) { in initCameraParameters() 60 if (mFDP->ConsumeBool()) { in initCameraParameters() 61 int32_t width = mFDP->ConsumeIntegral<int32_t>(); in initCameraParameters() 62 int32_t height = mFDP->ConsumeIntegral<int32_t>(); in initCameraParameters() 63 int32_t minFps = mFDP->ConsumeIntegral<int32_t>(); in initCameraParameters() 64 int32_t maxFps = mFDP->ConsumeIntegral<int32_t>(); in initCameraParameters() 65 params = mFDP->ConsumeBool() ? mFDP->ConsumeRandomLengthString(kMaxBytes).c_str() in initCameraParameters() 68 if (mFDP->ConsumeBool()) { in initCameraParameters() 69 params += mFDP->ConsumeBool() ? mFDP->ConsumeRandomLengthString(kMaxBytes).c_str() in initCameraParameters() [all …]
|
D | camera_utils_fuzzer.cpp | 36 FuzzedDataProvider* mFDP = nullptr; member in CameraUtilsFuzzer 43 auto callCameraUtilsAPIs = mFDP->PickValueInArray<const std::function<void()>>({ in invokeCameraUtils() 46 if (mFDP->ConsumeBool()) { in invokeCameraUtils() 47 int32_t orientVal = mFDP->ConsumeBool() in invokeCameraUtils() 48 ? mFDP->PickValueInArray(kValidOrientation) in invokeCameraUtils() 49 : mFDP->ConsumeIntegral<int32_t>(); in invokeCameraUtils() 50 uint8_t facingVal = mFDP->ConsumeBool() in invokeCameraUtils() 51 ? mFDP->PickValueInArray(kValidFacing) in invokeCameraUtils() 52 : mFDP->ConsumeIntegral<uint8_t>(); in invokeCameraUtils() 58 i <= mFDP->ConsumeIntegralInRange<int32_t>(kMinCapacity, kMaxCapacity); in invokeCameraUtils() [all …]
|
D | camera_metadata_fuzzer.cpp | 39 FuzzedDataProvider* mFDP = nullptr; member in CameraMetadataFuzzer 44 uint32_t tag = mFDP->ConsumeIntegral<uint32_t>(); in callCameraMetadataUpdate() 50 auto selectMetadataConstructor = mFDP->PickValueInArray<const std::function<void()>>({ in initCameraMetadata() 53 mFDP->ConsumeIntegralInRange<size_t>( in initCameraMetadata() 55 mFDP->ConsumeIntegralInRange<size_t>( in initCameraMetadata() 63 size_t entryCapacity = mFDP->ConsumeIntegralInRange<size_t>(kSizeMin, kSizeMax); in initCameraMetadata() 64 size_t dataCapacity = mFDP->ConsumeIntegralInRange<size_t>(kSizeMin, kSizeMax); in initCameraMetadata() 74 mMetadataLocked = mFDP->ConsumeBool(); in invokeCameraMetadata() 80 while (mFDP->remaining_bytes()) { in invokeCameraMetadata() 81 auto callMetadataAPIs = mFDP->PickValueInArray<const std::function<void()>>({ in invokeCameraMetadata() [all …]
|
D | camera_fuzzer.cpp | 94 FuzzedDataProvider* mFDP = nullptr; member in CameraFuzzer 108 int32_t numFds = mFDP->ConsumeIntegralInRange<int32_t>(kMinElements, kMaxElements); in createNativeHandle() 109 int32_t numInts = mFDP->ConsumeIntegralInRange<int32_t>(kNumMin, kNumMax); in createNativeHandle() 112 std::string filename = mFDP->ConsumeRandomLengthString(kMaxBytes); in createNativeHandle() 126 if (mFDP->ConsumeBool()) { in initCamera() 127 cameraService->connect(this, mFDP->ConsumeIntegral<int32_t>() /* cameraId */, "CAMERAFUZZ", in initCamera() 134 cameraService->connect(this, mFDP->ConsumeIntegral<int32_t>() /* cameraId */, in initCamera() 135 mFDP->ConsumeRandomLengthString(kMaxBytes).c_str(), in initCamera() 136 mFDP->ConsumeIntegral<int8_t>() /* clientUid */, in initCamera() 137 mFDP->ConsumeIntegral<int8_t>() /* clientPid */, in initCamera() [all …]
|
D | camera_c2OutputConfiguration_fuzzer.cpp | 41 FuzzedDataProvider* mFDP = nullptr; member in C2OutputConfigurationFuzzer 47 static_cast<String8>(mFDP->ConsumeRandomLengthString(kMaxBytes).c_str()) /* name */, in createIGraphicBufferProducer() 48 mFDP->ConsumeIntegral<uint32_t>() /* width */, in createIGraphicBufferProducer() 49 mFDP->ConsumeIntegral<uint32_t>() /* height */, in createIGraphicBufferProducer() 50 mFDP->ConsumeIntegral<int32_t>() /* format */, in createIGraphicBufferProducer() 51 mFDP->ConsumeIntegral<int32_t>() /* flags */); in createIGraphicBufferProducer() 64 mFDP->PickValueInArray<const std::function<void()>>({ in getC2OutputConfig() 68 int32_t rotation = mFDP->ConsumeIntegral<int32_t>(); in getC2OutputConfig() 69 string physicalCameraId = mFDP->ConsumeRandomLengthString(kMaxBytes); in getC2OutputConfig() 70 int32_t surfaceSetID = mFDP->ConsumeIntegral<int32_t>(); in getC2OutputConfig() [all …]
|
D | camera_vendorTagDescriptor_fuzzer.cpp | 84 FuzzedDataProvider* mFDP = nullptr; member in VendorTagDescriptorFuzzer 88 if (mFDP->ConsumeBool()) { in initVendorTagDescriptor() 101 int8_t count = mFDP->ConsumeIntegralInRange<int8_t>(kMinLoopIterations, kMaxLoopIterations); in invokeVendorTagDescriptor() 103 auto callVendorTagDescriptor = mFDP->PickValueInArray<const std::function<void()>>({ in invokeVendorTagDescriptor() 133 String8 name((mFDP->ConsumeRandomLengthString()).c_str()); in invokeVendorTagDescriptor() 134 String8 section((mFDP->ConsumeRandomLengthString()).c_str()); in invokeVendorTagDescriptor() 140 int32_t verbosity = mFDP->ConsumeIntegralInRange<int32_t>(kRangeMin, kRangeMax); in invokeVendorTagDescriptor() 142 mFDP->ConsumeIntegralInRange<int32_t>(kRangeMin, kRangeMax); in invokeVendorTagDescriptor() 151 if (mFDP->ConsumeBool()) { in invokeVendorTagDescriptor() 154 invokeNewReadWriteParcelsp<VendorTagDescriptor>(mVendorTagDescriptor, *mFDP); in invokeVendorTagDescriptor() [all …]
|
/frameworks/native/cmds/cmd/fuzzer/ |
D | cmd_fuzzer.cpp | 45 FuzzedDataProvider* mFDP = nullptr; member in CmdFuzzer 49 mFDP = new FuzzedDataProvider(data, size); in process() 51 if (mFDP->ConsumeBool()) { in process() 52 if (mFDP->ConsumeBool()) { in process() 58 while (mFDP->remaining_bytes() > 0) { in process() 59 size_t sizestr = mFDP->ConsumeIntegralInRange<size_t>(1, mFDP->remaining_bytes()); in process() 60 string argument = mFDP->ConsumeBytesAsString(sizestr); in process() 79 RunMode runMode = mFDP->ConsumeBool() ? RunMode::kStandalone : RunMode::kLibrary; in process() 81 delete mFDP; in process()
|
/frameworks/av/media/module/codecserviceregistrant/fuzzer/ |
D | codecServiceRegistrant_fuzzer.cpp | 53 FuzzedDataProvider *mFDP = nullptr; member in CodecServiceRegistrantFuzzer 96 uint32_t width = mFDP->ConsumeIntegral<uint32_t>(); in invokeConfigSM() 97 uint32_t height = mFDP->ConsumeIntegral<uint32_t>(); in invokeConfigSM() 98 uint32_t samplingRate = mFDP->ConsumeIntegral<uint32_t>(); in invokeConfigSM() 99 uint32_t channels = mFDP->ConsumeIntegral<uint32_t>(); in invokeConfigSM() 100 if (mFDP->ConsumeBool()) { in invokeConfigSM() 104 if (mFDP->ConsumeBool()) { in invokeConfigSM() 108 if (mFDP->ConsumeBool()) { in invokeConfigSM() 120 if (mFDP->ConsumeBool()) { in invokeQuerySM() 124 uint32_t stream = mFDP->ConsumeIntegral<uint32_t>(); in invokeQuerySM() [all …]
|
/frameworks/av/media/libstagefright/httplive/fuzzer/ |
D | httplive_fuzzer.cpp | 170 FuzzedDataProvider *mFDP = nullptr; member in HttpLiveFuzzer 259 size_t size = mFDP->ConsumeIntegralInRange<size_t>(kRangeMin, kRangeMax); in invokeLiveDataSource() 264 int32_t finalResult = mFDP->ConsumeIntegralInRange(kErrorNoMin, kErrorNoMax); in invokeLiveDataSource() 281 uint32_t flags = mFDP->ConsumeIntegral<uint32_t>(); in initLiveSession() 288 LiveSession::StreamType stream = mFDP->PickValueInArray(kValidStreamType); in invokeDequeueAccessUnit() 294 int64_t timeUs = mFDP->ConsumeIntegralInRange<int64_t>(0, kMaxTimeUs); in invokeSeekTo() 296 mFDP->PickValueInArray(kValidSeekMode); in invokeSeekTo() 302 size_t trackIndex = mFDP->ConsumeIntegral<size_t>(); in invokeGetConfig() 304 media_track_type type = mFDP->PickValueInArray(kValidMediaTrackType); in invokeGetConfig() 307 LiveSession::StreamType stream = mFDP->PickValueInArray(kValidStreamType); in invokeGetConfig() [all …]
|