• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/bt


Commit MetaInfo

Revisãoe88c30b7dc0a3b3dbfe6c9e5620927fa2531700d (tree)
Hora2018-12-05 01:21:12
AutorUgo Yu <ugoyu@goog...>
CommiterVasyl Gello

Mensagem de Log

DO NOT MERGE - Check SDU lower bound before allocate p_data

Bug: 112321180
Test: SL4A BleCocTest:test_coc_insecured_connection_write_ascii
Change-Id: Id0c9aa2097f0b6bdc2bb9fa9086daa9452188e1d
(cherry picked from commit 6fc96f847be808a4f38eae45b5e9bbc3f18b9a2d)

Mudança Sumário

Diff

--- a/stack/l2cap/l2c_fcr.c
+++ b/stack/l2cap/l2c_fcr.c
@@ -880,6 +880,13 @@ void l2c_lcc_proc_pdu(tL2C_CCB *p_ccb, BT_HDR *p_buf)
880880 return;
881881 }
882882
883+ if (sdu_length < p_buf->len) {
884+ L2CAP_TRACE_ERROR("%s: Invalid sdu_length: %d", __func__, sdu_length);
885+ android_errorWriteWithInfoLog(0x534e4554, "112321180", -1, NULL, 0);
886+ /* Discard the buffer */
887+ osi_free(p_buf);
888+ return;
889+ }
883890
884891 if ((p_data = (BT_HDR *) osi_malloc(L2CAP_MAX_BUF_SIZE)) == NULL)
885892 {