diff options
| author | Pavlin Radoslavov <pavlin@google.com> | 2017-07-17 16:03:21 -0700 |
|---|---|---|
| committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-08-08 18:43:03 +0000 |
| commit | dc296399bb5545567f07d31b8700afb32cac4d9d (patch) | |
| tree | adebe1fa6e5338f629c7affd64ac10fd63c38ab6 | |
| parent | e89b55f994840acedf1aa869899a8eeb6460032f (diff) | |
| download | android_system_bt-dc296399bb5545567f07d31b8700afb32cac4d9d.tar.gz android_system_bt-dc296399bb5545567f07d31b8700afb32cac4d9d.tar.bz2 android_system_bt-dc296399bb5545567f07d31b8700afb32cac4d9d.zip | |
Add missing extension length check while parsing BNEP control packets
Bug: 63146237
Test: External script
Change-Id: I4e519cec1c7dffb8bd42add00bd891e0969a3d9f
(cherry picked from commit 9ab89b7dbe5735b796799f65144efa48595d0230)
(cherry picked from commit dc7700a43189d2a8607b69ae19a6d646f11ddf51)
| -rw-r--r-- | stack/bnep/bnep_utils.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stack/bnep/bnep_utils.cc b/stack/bnep/bnep_utils.cc index f2be41108..872f4f565 100644 --- a/stack/bnep/bnep_utils.cc +++ b/stack/bnep/bnep_utils.cc @@ -832,7 +832,7 @@ uint8_t* bnep_process_control_packet(tBNEP_CONN* p_bcb, uint8_t* p, BNEP_TRACE_ERROR("%s: BNEP - bad ctl pkt type: %d", __func__, control_type); bnep_send_command_not_understood(p_bcb, control_type); - if (is_ext) { + if (is_ext && (ext_len > 0)) { if (*rem_len < (ext_len - 1)) { goto bad_packet_length; } |
