Loading media/mtp/tests/MtpFuzzer/mtp_packet_fuzzer.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <MtpPacket.h> #include <MtpPacketFuzzerUtils.h> #include <fuzzer/FuzzedDataProvider.h> #include <mtp.h> using namespace android; Loading @@ -35,7 +36,8 @@ class MtpPacketFuzzer : MtpPacketFuzzerUtils { }; void MtpPacketFuzzer::process() { MtpPacket mtpPacket(mFdp.ConsumeIntegralInRange<size_t>(kMinSize, kMaxSize)); /*bufferSize*/ MtpPacket mtpPacket(mFdp.ConsumeIntegralInRange<size_t>(MTP_CONTAINER_HEADER_SIZE, kMaxSize)); /*bufferSize*/ while (mFdp.remaining_bytes() > 0) { auto mtpPacketAPI = mFdp.PickValueInArray<const std::function<void()>>({ [&]() { Loading Loading
media/mtp/tests/MtpFuzzer/mtp_packet_fuzzer.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <MtpPacket.h> #include <MtpPacketFuzzerUtils.h> #include <fuzzer/FuzzedDataProvider.h> #include <mtp.h> using namespace android; Loading @@ -35,7 +36,8 @@ class MtpPacketFuzzer : MtpPacketFuzzerUtils { }; void MtpPacketFuzzer::process() { MtpPacket mtpPacket(mFdp.ConsumeIntegralInRange<size_t>(kMinSize, kMaxSize)); /*bufferSize*/ MtpPacket mtpPacket(mFdp.ConsumeIntegralInRange<size_t>(MTP_CONTAINER_HEADER_SIZE, kMaxSize)); /*bufferSize*/ while (mFdp.remaining_bytes() > 0) { auto mtpPacketAPI = mFdp.PickValueInArray<const std::function<void()>>({ [&]() { Loading