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

Commit 6906fb05 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Added limit to number of Loop Iterations in C2Fuzzer"

parents f8a6bddd 3426aa20
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;