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

Commit 6399c602 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "fuzz: Properly check 64 bit overflow fake_timerfd" am: dd69539f

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2032575

Change-Id: I38fd0955c4e0d0c323c78e0548645de40c37499d
parents d10df2dc dd69539f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ static bool fire_next_event(uint64_t new_clock) {

void fake_timerfd_advance(uint64_t ms) {
  uint64_t new_clock = clock + ms;
  if (new_clock > max_clock) {
  if (new_clock < clock) {
    new_clock = max_clock;
  }
  while (fire_next_event(new_clock)) {
+5 −1
Original line number Diff line number Diff line
@@ -77,7 +77,11 @@ void Alarm::on_fire() {
  lock.unlock();
  std::move(task).Run();
  ASSERT(bytes_read == static_cast<ssize_t>(sizeof(uint64_t)));
  ASSERT(times_invoked == static_cast<uint64_t>(1));
  ASSERT_LOG(
      times_invoked == static_cast<uint64_t>(1),
      "Invoked number of times:%lu fd:%d",
      (unsigned long)times_invoked,
      fd_);
}

}  // namespace os