Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 704fbabd authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Added limit to number of Loop Iterations in C2Fuzzer" am: 6906fb05

parents 4249588a 6906fb05
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -246,7 +246,8 @@ void Codec2Fuzzer::decodeFrames(const uint8_t* data, size_t size) {
  bufferSource->parse();
  c2_status_t status = C2_OK;
  size_t numFrames = 0;
  while (!bufferSource->isEos()) {
  int32_t iterationCount = 0;
  while (!bufferSource->isEos() && ++iterationCount <= kMaxIterations) {
    uint8_t* frame = nullptr;
    size_t frameSize = 0;
    FrameData frameData = bufferSource->getFrame();
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ namespace android {
#define C2FUZZER_ALIGN(_sz, _align) (((_sz) + ((_align)-1)) & ~((_align)-1))

constexpr std::chrono::milliseconds kC2FuzzerTimeOut = 5000ms;
constexpr int32_t kMaxIterations = 100;
constexpr int32_t kNumberOfC2WorkItems = 8;
constexpr uint32_t kWidthOfVideo = 3840;
constexpr uint32_t kHeightOfVideo = 2160;