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

Commit 77a234d8 authored by Bill Schilit's avatar Bill Schilit
Browse files

RootCanal: Fix length of page_number slice in SendCommandToRemoteByAddress

The code is reading two bytes for the page_number, it fails because
the page_number is only 1 byte long and the last parameter
of the Read Remote Extended Features command.

        Assertion failed: ((offset + size) <= size_), function subrange, file
        /Volumes/Android/buildbot/src/android/emu-master-dev/external/rust/crates/pdl-compiler/scripts/packet_runtime.h,
        line 45.

Bug: 296537295
Test: manual
Change-Id: I5241d666a2ebf8b167b9293163575e0022796422
parent 459f8c84
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2134,7 +2134,7 @@ ErrorCode LinkLayerController::SendCommandToRemoteByAddress(
              own_address, peer_address));
      break;
    case (OpCode::READ_REMOTE_EXTENDED_FEATURES): {
      pdl::packet::slice page_number_slice = args.subrange(5, 2);
      pdl::packet::slice page_number_slice = args.subrange(5, 1);
      uint8_t page_number = page_number_slice.read_le<uint8_t>();
      SendLinkLayerPacket(
          model::packets::ReadRemoteExtendedFeaturesBuilder::Create(