Android-x86
Fork


コミットメタ情報

リビジョン8e702ed3539caac44a616243e33aaad1b2b4801f (tree)
日時2018-05-26 03:42:03
作者Ajay Panicker <apanicke@goog...>
コミッターandroid-build-team Robot

ログメッセージ

DO NOT MERGE: Check number of attributes before writing to a buffer

Bug: 73824150
Test: Compile
Change-Id: I2a28a503cd74758e707d1e591b55c278d2299f45
(cherry picked from commit f6db54f071f6974e18b10bb0c2cfcf397cd4c980)

変更サマリ

差分

--- a/btif/src/btif_rc.cc
+++ b/btif/src/btif_rc.cc
@@ -45,6 +45,7 @@
4545 #include "btif_util.h"
4646 #include "btu.h"
4747 #include "device/include/interop.h"
48+#include "log/log.h"
4849 #include "osi/include/list.h"
4950 #include "osi/include/osi.h"
5051 #include "osi/include/properties.h"
@@ -3502,6 +3503,12 @@ static void handle_app_cur_val_response(tBTA_AV_META_MSG* pmeta_msg,
35023503 RawAddress rc_addr = p_dev->rc_addr;
35033504
35043505 app_settings.num_attr = p_rsp->num_val;
3506+
3507+ if (app_settings.num_attr > BTRC_MAX_APP_SETTINGS) {
3508+ android_errorWriteLog(0x534e4554, "73824150");
3509+ app_settings.num_attr = BTRC_MAX_APP_SETTINGS;
3510+ }
3511+
35053512 for (xx = 0; xx < app_settings.num_attr; xx++) {
35063513 app_settings.attr_ids[xx] = p_rsp->p_vals[xx].attr_id;
35073514 app_settings.attr_values[xx] = p_rsp->p_vals[xx].attr_val;
旧リポジトリブラウザで表示