OSDN Git Service

Merge "GAP: Correct the continuous pkt length in l2cap" into oc-dev
authorTreeHugger Robot <treehugger-gerrit@google.com>
Tue, 3 Dec 2019 00:33:29 +0000 (00:33 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Tue, 3 Dec 2019 00:33:29 +0000 (00:33 +0000)
hci/src/packet_fragmenter.cc

index 7ac4850..3a1175e 100644 (file)
@@ -214,7 +214,8 @@ static void reassemble_and_dispatch(UNUSED_ATTR BT_HDR* packet) {
                  "%s got packet which would exceed expected length of %d. "
                  "Truncating.",
                  __func__, partial_packet->len);
-        packet->len = partial_packet->len - partial_packet->offset;
+        packet->len =
+            (partial_packet->len - partial_packet->offset) + packet->offset;
         projected_offset = partial_packet->len;
       }