• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubybathyscaphegamephpguicwindows翻訳pythonomegattwitterframeworkbtronarduinovb.net計画中(planning stage)directxpreviewertestゲームエンジンdom

system/bt


Commit MetaInfo

Revision215d4340cb568c552141654bfe3b32d4762345f4 (tree)
Zeit2017-09-15 02:54:03
AutorPavlin Radoslavov <pavlin@goog...>
CommiterDan Pasanen

Log Message

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)
(cherry picked from commit c7874f25a0557ca4413d8db80bab8da842fc389a)
(cherry picked from commit 187bd8aec0aae63c6328981041e5ec7764ece6a9)
(cherry picked from commit 01f46e0aff705dab350cda7f648fb94976ea3988)
(cherry picked from commit e07d37969e654fd6be308232b15c1ed716205543)

Ändern Zusammenfassung

Diff

--- a/stack/bnep/bnep_utils.c
+++ b/stack/bnep/bnep_utils.c
@@ -886,7 +886,7 @@ UINT8 *bnep_process_control_packet (tBNEP_CONN *p_bcb, UINT8 *p, UINT16 *rem_len
886886 BNEP_TRACE_ERROR("%s: BNEP - bad ctl pkt type: %d", __func__,
887887 control_type);
888888 bnep_send_command_not_understood (p_bcb, control_type);
889- if (is_ext)
889+ if (is_ext && (ext_len > 0))
890890 {
891891 if (*rem_len < (ext_len - 1)) {
892892 goto bad_packet_length;