OSDN Git Service

android-x86/system-bt.git
6 years agoUse strlcpy() instead of strncpy() to copy string property
Pavlin Radoslavov [Fri, 8 Sep 2017 18:29:00 +0000 (18:29 +0000)]
Use strlcpy() instead of strncpy() to copy string property
am: c5c668a6d4

Change-Id: I55e6a015219819338aabfbb9a18b459fbaaaa056

6 years agoUse strlcpy() instead of strncpy() to copy string property
Pavlin Radoslavov [Thu, 7 Sep 2017 23:22:53 +0000 (16:22 -0700)]
Use strlcpy() instead of strncpy() to copy string property

Also, allocate property with extra space for the null-termination string.

Test: Unit tests passing
Change-Id: I67452cb640cda752c3094c2b1a47eaa13c24e5c6

6 years agoRead the Tx Power level when flushing the A2DP Tx queue
Pavlin Radoslavov [Thu, 7 Sep 2017 22:37:08 +0000 (22:37 +0000)]
Read the Tx Power level when flushing the A2DP Tx queue
am: c7bf47cefc

Change-Id: I009f2e0f1d4d1857d12c3d01f817d83da977d526

6 years agoRead the Tx Power level when flushing the A2DP Tx queue
Pavlin Radoslavov [Fri, 1 Sep 2017 23:40:59 +0000 (16:40 -0700)]
Read the Tx Power level when flushing the A2DP Tx queue

Also, minor renaming and cleanup (for consistency).

Test: Streaming A2DP headset and trigger audio stutter
Bug: 64038257
Change-Id: Id722342b596e0bf3c9c7664272b6d3e311bb82e9

6 years agoImplement HCI_Read_Automatic_Flush_Timeout mechanism
Pavlin Radoslavov [Thu, 7 Sep 2017 22:22:04 +0000 (22:22 +0000)]
Implement HCI_Read_Automatic_Flush_Timeout mechanism
am: b8568ae0e1

Change-Id: I064439a79ca43945da7e74885fb9e9b17da804cb

6 years agoImplement HCI_Read_Automatic_Flush_Timeout mechanism
Pavlin Radoslavov [Fri, 1 Sep 2017 23:09:27 +0000 (16:09 -0700)]
Implement HCI_Read_Automatic_Flush_Timeout mechanism

Also, read the Automatic Flush Timeout when flushing the A2DP Tx queue

Test: Streaming A2DP headset and trigger audio stutter
Bug: 64038257
Change-Id: Ic49b5236328ddacde1d7f2aee131e35e317a14ef

6 years agoMerge "Fix GATT log spam"
Jakub Pawlowski [Thu, 7 Sep 2017 17:46:47 +0000 (17:46 +0000)]
Merge "Fix GATT log spam"
am: b94c72965a

Change-Id: I74f3628362ae952348bddbb5b435671da4a00592

6 years agoMerge "Fix GATT log spam"
Jakub Pawlowski [Thu, 7 Sep 2017 17:39:09 +0000 (17:39 +0000)]
Merge "Fix GATT log spam"

6 years agoAdd 'vendor.' prefix to a vendor HAL service name
Jaekyun Seok [Thu, 7 Sep 2017 02:08:05 +0000 (02:08 +0000)]
Add 'vendor.' prefix to a vendor HAL service name
am: b7fe6161ad

Change-Id: Id06569074e309f8977751cbe6bf135dc2e525402

6 years agoAdd 'vendor.' prefix to a vendor HAL service name
Jaekyun Seok [Wed, 30 Aug 2017 02:17:08 +0000 (11:17 +0900)]
Add 'vendor.' prefix to a vendor HAL service name

To prevent property name collisions between properties of system and
vendor, 'vendor.' prefix must be added to a vendor HAL service name.
You can see the details in http://go/treble-sysprop-compatibility.

Test: succeeded building gce_x86_phone-userdebug and confirmed that
service names were renamed correctly.
Bug: 36796459
Change-Id: Iedcb3a01e00e80c58dc76653784a3c353f34ce0a

6 years agoFix stack-buffer-overflow in bluetooth service GATT client
Michael Spang [Wed, 6 Sep 2017 19:57:08 +0000 (19:57 +0000)]
Fix stack-buffer-overflow in bluetooth service GATT client
am: 998f78519d

Change-Id: I8077302700eea32cd1460870b870aa519699fcc1

6 years agoFix stack-buffer-overflow in bluetooth service GATT client
Michael Spang [Wed, 6 Sep 2017 15:44:33 +0000 (11:44 -0400)]
Fix stack-buffer-overflow in bluetooth service GATT client

Use the tBTA_GATTC union for |notify| in bta_gattc_process_indicate() to
avoid a stack-buffer-overflow in btif_transfer_context.

==1410==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x0077c8c0c066 at pc 0x0077e50c9ae0 bp 0x0077c8c0bcd0 sp 0x0077c8c0b460

READ of size 616 at 0x0077c8c0c066 thread T38 (btu message loo)
    #0 0x77e50c9adf in __interceptor_memcpy external/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:701:5
    #1 0x77ca1e838f in memcpy(void*, void const* pass_object_size0, unsigned long) bionic/libc/include/string.h:173:12
    #2 0x77ca1e838f in btif_transfer_context(void (*)(unsigned short, char*), unsigned short, char*, int, void (*)(unsigned short, char*, char*)) system/bt/btif/src/btif_core.cc:208:0
    #3 0x77ca209853 in (anonymous namespace)::bta_gattc_cback(unsigned char, tBTA_GATTC*) system/bt/btif/src/btif_gatt_client.cc:204:7
    #4 0x77ca11455b in bta_gattc_process_indicate(unsigned short, unsigned char, tGATT_CL_COMPLETE*) system/bt/bta/gatt/bta_gattc_act.cc:1596:9
    #5 0x77ca40b4b7 in gatt_process_notification(tGATT_TCB&, unsigned char, unsigned short, unsigned char*) system/bt/stack/gatt/gatt_cl.cc:664:7
    #6 0x77ca40d78f in gatt_client_handle_server_rsp(tGATT_TCB&, unsigned char, unsigned short, unsigned char*) system/bt/stack/gatt/gatt_cl.cc:1119:9
    #7 0x77ca414447 in gatt_le_data_ind(unsigned short, unsigned char*, BT_HDR*) system/bt/stack/gatt/gatt_main.cc:576:7
    #8 0x77ca47665b in l2c_rcv_acl_data(BT_HDR*) system/bt/stack/l2cap/l2c_main.cc:211:9
    #9 0x77c9da50eb in base::Callback<void (), (base::internal::CopyMode)1>::Run() const external/libchrome/base/callback.h:389:12
    #10 0x77c9da50eb in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask const&) external/libchrome/base/debug/task_annotator.cc:51:0
    #11 0x77c9df75e3 in base::MessageLoop::RunTask(base::PendingTask const&) external/libchrome/base/message_loop/message_loop.cc:494:19
    #12 0x77c9df80b7 in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) external/libchrome/base/message_loop/message_loop.cc:503:5
    #13 0x77c9df8fb7 in base::MessageLoop::DoWork() external/libchrome/base/message_loop/message_loop.cc:627:13
    #14 0x77c9dfd33b in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) external/libchrome/base/message_loop/message_pump_default.cc:35:31
    #15 0x77c9e4e327 in base::RunLoop::Run() external/libchrome/base/run_loop.cc:35:10
    #16 0x77ca3e97ab in btu_message_loop_run(void*) system/bt/stack/btu/btu_task.cc:98:14
    #17 0x77ca52ad3b in work_queue_read_cb(void*) system/bt/osi/src/thread.cc:251:3
    #18 0x77ca52489b in run_reactor(reactor_t*, int) system/bt/osi/src/reactor.cc:282:11
    #19 0x77ca524413 in reactor_start(reactor_t*) system/bt/osi/src/reactor.cc:125:10
    #20 0x77ca529c6f in run_thread(void*) system/bt/osi/src/thread.cc:221:3
    #21 0x77eb40a31b in __pthread_start(void*) bionic/libc/bionic/pthread_create.cpp:214:18
    #22 0x77eb3c1dff in __start_thread bionic/libc/bionic/clone.cpp:47:16

002(bluetooth) btu message loo identical 2 lines

Address 0x0077c8c0c066 is located in stack of thread T38 (btu message loo)
 at offset 646 in frame

    #0 0x77ca114293 in bta_gattc_process_indicate(unsigned short, unsigned char, tGATT_CL_COMPLETE*) system/bt/bta/gatt/bta_gattc_act.cc:1538:0

002(bluetooth) btu message loo identical 1 line

  This frame has 4 object(s):

    [32, 646) 'notify' (line 1543)
    [784, 790) 'remote_bda' (line 1544) <== Memory access at offset 646 partially underflows this variable
    [816, 817) 'gatt_if' (line 1545) <== Memory access at offset 646 partially underflows this variable
    [832, 833) 'transport' (line 1546) <== Memory access at offset 646 partially underflows this variable

HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext

      (longjmp and C++ exceptions *are* supported)

Thread T38 (btu message loo) created by T37 (bt_workqueue) here:

    #0 0x77e50fd46f in __interceptor_pthread_create _asan_rtl_:3
    #1 0x77ca529727 in thread_new_sized(char const*, unsigned long) system/bt/osi/src/thread.cc:87:3
    #2 0x77ca3e9a73 in btu_task_start_up(void*) system/bt/stack/btu/btu_task.cc:127:26
    #3 0x77ca52ad3b in work_queue_read_cb(void*) system/bt/osi/src/thread.cc:251:3
    #4 0x77ca52489b in run_reactor(reactor_t*, int) system/bt/osi/src/reactor.cc:282:11
    #5 0x77ca524413 in reactor_start(reactor_t*) system/bt/osi/src/reactor.cc:125:10
    #6 0x77ca529c6f in run_thread(void*) system/bt/osi/src/thread.cc:221:3
    #7 0x77eb40a31b in __pthread_start(void*) bionic/libc/bionic/pthread_create.cpp:214:18
    #8 0x77eb3c1dff in __start_thread bionic/libc/bionic/clone.cpp:47:16

002(bluetooth) btu message loo identical 1 line

Thread T37 (bt_workqueue) created by T20 (stack_manager) here:

    #0 0x77e50fd46f in __interceptor_pthread_create _asan_rtl_:3
    #1 0x77ca529727 in thread_new_sized(char const*, unsigned long) system/bt/osi/src/thread.cc:87:3
    #2 0x77ca3e936f in BTU_StartUp() system/bt/stack/btu/btu_init.cc:129:25
    #3 0x77ca2a513b in event_start_up_stack(void*) system/bt/btif/src/stack_manager.cc:146:3
    #4 0x77ca52ad3b in work_queue_read_cb(void*) system/bt/osi/src/thread.cc:251:3
    #5 0x77ca52489b in run_reactor(reactor_t*, int) system/bt/osi/src/reactor.cc:282:11
    #6 0x77ca524413 in reactor_start(reactor_t*) system/bt/osi/src/reactor.cc:125:10
    #7 0x77ca529c6f in run_thread(void*) system/bt/osi/src/thread.cc:221:3
    #8 0x77eb40a31b in __pthread_start(void*) bionic/libc/bionic/pthread_create.cpp:214:18
    #9 0x77eb3c1dff in __start_thread bionic/libc/bionic/clone.cpp:47:16

002(bluetooth) btu message loo identical 1 line

Thread T20 (stack_manager) created by T0 (droid.bluetooth) here:

    #0 0x77e50fd46f in __interceptor_pthread_create _asan_rtl_:3
    #1 0x77ca529727 in thread_new_sized(char const*, unsigned long) system/bt/osi/src/thread.cc:87:3
    #2 0x77ca2a4e7f in ensure_manager_initialized() system/bt/btif/src/stack_manager.cc:238:23
    #3 0x77ca2a4e7f in stack_manager_get_interface() system/bt/btif/src/stack_manager.cc:251:0
    #4 0x77ca1b7927 in init(bt_callbacks_t*) system/bt/btif/src/bluetooth.cc:144:3
    #5 0x77ca9899fb in android::initNative(_JNIEnv*, _jobject*) packages/apps/Bluetooth/jni/com_android_bluetooth_btservice_AdapterService.cpp:663:13
    #6 0x77e1c87703 in art_quick_generic_jni_trampoline /proc/self/cwd/art/runtime/arch/arm64/quick_entrypoints_arm64.S:2329:0

    #6 0x37ab0579318381f  (<unknown module>)

002(bluetooth) btu message loo identical 1 line

SUMMARY: AddressSanitizer: stack-buffer-overflow (/system/lib64/libclang_rt.asan-aarch64-android.so+0x31adf)

Shadow bytes around the buggy address:
  0x001ef91817b0: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
  0x001ef91817c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x001ef91817d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x001ef91817e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x001ef91817f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x001ef9181800: 00 00 00 00 00 00 00 00 00 00 00 00[06]f2 f2 f2
  0x001ef9181810: f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 06 f2
  0x001ef9181820: f2 f2 01 f2 01 f3 f3 f3 00 00 00 00 00 00 00 00
  0x001ef9181830: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x001ef9181840: f1 f1 f1 f1 00 00 00 00 00 00 00 00 00 00 00 00
  0x001ef9181850: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb

==1410==ABORTING

Bug: 65381426

Change-Id: Ie632f131b622cc323ce68ec7be152caef23c95ec

6 years agoMerge "Extended Scan HCI definations as per BT 5.0 SIG "
Sagayajayasheelan Thomas [Wed, 6 Sep 2017 17:08:34 +0000 (17:08 +0000)]
Merge "Extended Scan HCI definations as per BT 5.0 SIG "
am: 62721a272c

Change-Id: I8df6de2371754efa7a76f1aea7f072702257ba9c

6 years agoMerge "Extended Scan HCI definations as per BT 5.0 SIG "
Treehugger Robot [Wed, 6 Sep 2017 17:03:37 +0000 (17:03 +0000)]
Merge "Extended Scan HCI definations as per BT 5.0 SIG "

6 years agoStore a name string in property without violating string boundaries
Pavlin Radoslavov [Wed, 6 Sep 2017 16:35:55 +0000 (16:35 +0000)]
Store a name string in property without violating string boundaries
am: 2a874660a9

Change-Id: I4c96e2ac0135c50ef633e86ad93b867de76c753d

6 years agoFix GATT log spam
Jakub Pawlowski [Wed, 6 Sep 2017 15:41:46 +0000 (08:41 -0700)]
Fix GATT log spam

Bug: 65255942
Test: manual
Change-Id: I212bc93149dc514517f409edc36f74e1c2895d96

6 years agoStore a name string in property without violating string boundaries
Pavlin Radoslavov [Sun, 19 Mar 2017 02:35:06 +0000 (19:35 -0700)]
Store a name string in property without violating string boundaries

Don't copy data beyond end of string when storing it as BT_PROPERTY_BDNAME
in property.
Also, update an unit test to create a string by considering the property
name length.

Test: Running unit tests with ASAN enabled
Change-Id: Iaa586b4a0942f99ba469d1ed963729e7ad721503

6 years agoExtended Scan HCI definations as per BT 5.0 SIG
Sagayajayasheelan Thomas [Mon, 17 Jul 2017 09:50:01 +0000 (15:20 +0530)]
Extended Scan HCI definations as per BT 5.0 SIG

Added Ext Scan HCI defination for periodic scan.

Change-Id: Ic7dce5fb5207a22e4b193d84033d84126d780be5
Signed-off-by: Sagayajayasheelan Thomas <sagayajayasheelan.thomas@intel.com>
6 years agoClear IB_CFG_DONE on receiving peer config request when channel open
Srinu Jella [Wed, 6 Sep 2017 02:37:59 +0000 (02:37 +0000)]
Clear IB_CFG_DONE on receiving peer config request when channel open
am: 7f1ee9db2d

Change-Id: Ic96d305927361e75bf328eeeaff9d91d96ea9916

6 years agoClear IB_CFG_DONE on receiving peer config request when channel open
Srinu Jella [Thu, 17 Nov 2016 09:32:20 +0000 (15:02 +0530)]
Clear IB_CFG_DONE on receiving peer config request when channel open

Root Cause: Configure request fails in CST_OPEN state
after a configure request IB_CFG_DONE and OB_CFG_DONE both are
cleared. Some IOT devices try to configure again in the CST_OPEN
state which fails if OB_CFG_DONE is cleared.

Fix: Clear IB_CFG_DONE and keep OB_CFG_DONE unchanged on receiving
Peer config request when channel open.

Test: Tested with Geely Carkit.
Bug: 35082459

Change-Id: I8deca0c8ff73faafc3da94dcd9ea55e06bd8a31d

6 years agoAvoid lookup on NULL address
Martin Brabham [Tue, 5 Sep 2017 23:18:07 +0000 (23:18 +0000)]
Avoid lookup on NULL address
am: 24e9be4451

Change-Id: Id4ea4378f8ff970fc453223683e688e7e4039de3

6 years agoAvoid lookup on NULL address
Martin Brabham [Wed, 3 May 2017 23:05:47 +0000 (16:05 -0700)]
Avoid lookup on NULL address

Test: Manually watch some debug logs during pairing and auth processes
Change-Id: I6410b8bc00587196392ae787a6aa1d85c0c71967

6 years agoImplement HCI_Read_Failed_Contact_Counter mechanism
Pavlin Radoslavov [Fri, 1 Sep 2017 22:14:25 +0000 (22:14 +0000)]
Implement HCI_Read_Failed_Contact_Counter mechanism
am: 6ab749f3cf

Change-Id: Iad9cbb043f886c3d75462f4b7f28d031a56e7cc5

6 years agoImplement HCI_Read_Failed_Contact_Counter mechanism
Pavlin Radoslavov [Fri, 1 Sep 2017 05:06:11 +0000 (22:06 -0700)]
Implement HCI_Read_Failed_Contact_Counter mechanism

Also, read the Failed Contact Counter when flushing the A2DP Tx queue

Test: Streaming A2DP headset and trigger audio stutter
Bug: 64038257
Change-Id: I8ff72560e3840c5c22cfac9613c4be670b8a4cf1

6 years agoAdd / update log messages during stack startup / shutdown
Pavlin Radoslavov [Thu, 31 Aug 2017 18:55:10 +0000 (18:55 +0000)]
Add / update log messages during stack startup / shutdown
am: 303ff4cee3

Change-Id: I7aadb8a0dfeb19fbc133566386aa6d4275871721

6 years agoAdd / update log messages during stack startup / shutdown
Pavlin Radoslavov [Tue, 29 Aug 2017 17:00:21 +0000 (10:00 -0700)]
Add / update log messages during stack startup / shutdown

Test: manual
Bug: 64975965
Change-Id: I22ae7cad3b0ef3b7eb7ea2b7b6f93449a6363070

6 years agoMerge "BTIF: Add meaningful logging to btif_profile_queue"
Jack He [Thu, 31 Aug 2017 03:43:39 +0000 (03:43 +0000)]
Merge "BTIF: Add meaningful logging to btif_profile_queue"
am: 812f2f5d85

Change-Id: Id4dddfe628c434d52a7dd14dd8cc1104c4f7cb4c

6 years agoMerge "BTIF: Add meaningful logging to btif_profile_queue"
Treehugger Robot [Thu, 31 Aug 2017 03:25:30 +0000 (03:25 +0000)]
Merge "BTIF: Add meaningful logging to btif_profile_queue"

6 years agoMerge "Limit the maximum number of entries in the remote bdaddr cache to 1024"
Pavlin Radoslavov [Thu, 31 Aug 2017 02:17:33 +0000 (02:17 +0000)]
Merge "Limit the maximum number of entries in the remote bdaddr cache to 1024"
am: e5c35d0380

Change-Id: I34596127aa46c2e553f9f238cab7c0be378bf51c

6 years agoRFCOMM: Add more logging during port close
Jack He [Thu, 31 Aug 2017 02:11:31 +0000 (02:11 +0000)]
RFCOMM: Add more logging during port close
am: 074867d4c7

Change-Id: I5e115a0ff5dfcfda72810b148c4eca56a06f152c

6 years agoMerge "Limit the maximum number of entries in the remote bdaddr cache to 1024"
Treehugger Robot [Thu, 31 Aug 2017 02:09:22 +0000 (02:09 +0000)]
Merge "Limit the maximum number of entries in the remote bdaddr cache to 1024"

6 years agoLimit the maximum number of entries in the remote bdaddr cache to 1024
Pavlin Radoslavov [Tue, 29 Aug 2017 00:42:46 +0000 (17:42 -0700)]
Limit the maximum number of entries in the remote bdaddr cache to 1024

Also, renamed p_dev_cb to remote_bdaddr_cache.

Bug: 64975965
Test: BLE scanning
Change-Id: I518390c53c5ff2a24ac9f010464225d763b33228

6 years agoRFCOMM: Add more logging during port close
Jack He [Wed, 30 Aug 2017 19:00:41 +0000 (12:00 -0700)]
RFCOMM: Add more logging during port close

* Log MAC address and UUIDs of closed connections
* Log reasons for RFCOMM closure when generic CLOSE is used
  as reason

Bug: 65080465
Test: Use profiles that use RFCOMM
Change-Id: Iff9f7537989e51d7b98f7cf1241db3f196f501d7

6 years agoBTIF: Add meaningful logging to btif_profile_queue
Jack He [Wed, 30 Aug 2017 18:13:08 +0000 (11:13 -0700)]
BTIF: Add meaningful logging to btif_profile_queue

* Add INFO logging to add/advance/execute functions in
  btif_profile_queue
* Add ERROR logging to add failures

Bug: 65051171
Test: Try connection to multiple profiles
Change-Id: I058ad06a45eeceb4d160af472f317d08843ca6bf

6 years agoInline comparison operators for RawAddress
Pavlin Radoslavov [Wed, 30 Aug 2017 20:04:23 +0000 (20:04 +0000)]
Inline comparison operators for RawAddress
am: c705670fbe

Change-Id: I32c31c8fe567ec898ef6cf8c6faf341dfb7568a3

6 years agoInline comparison operators for RawAddress
Pavlin Radoslavov [Wed, 30 Aug 2017 18:02:27 +0000 (11:02 -0700)]
Inline comparison operators for RawAddress

Test: Code compilation
Bug: 64975965

Change-Id: I5a7ab7e0cd270c2769a3a471a506fc78a0a94533

6 years agoAdd missing comparison operators for RawAddress
Pavlin Radoslavov [Wed, 30 Aug 2017 07:03:21 +0000 (07:03 +0000)]
Add missing comparison operators for RawAddress
am: b3e7d947a1

Change-Id: Id3febe2c7ed99300e970862630d5b2d748e91065

6 years agoAdd missing comparison operators for RawAddress
Pavlin Radoslavov [Tue, 29 Aug 2017 22:02:44 +0000 (15:02 -0700)]
Add missing comparison operators for RawAddress

Test: Unit tests added
Bug: 64975965
Change-Id: Id27f1ef7ec99f0761d6e2fb40bf38212ab8312a1

7 years agobtm: Finish renaming SMP_AUTH_<GEN_>BOND
Myles Watson [Fri, 25 Aug 2017 18:28:50 +0000 (18:28 +0000)]
btm: Finish renaming SMP_AUTH_<GEN_>BOND
am: b66829ab8b

Change-Id: I8295db3c0cc558abfa322889be58747b04ea7401

7 years agobtm: Finish renaming SMP_AUTH_<GEN_>BOND
Myles Watson [Thu, 4 May 2017 18:13:10 +0000 (11:13 -0700)]
btm: Finish renaming SMP_AUTH_<GEN_>BOND

Test: build, grep for SMP_AUTH_GEN_BOND
Change-Id: Ic9e1950282a60e1d644d79291d9c0822ac6c973e

7 years agoFix crashes in btm_consolidate_dev am: bd8ed367d3 am: 94357d4888
Jakub Pawlowski [Tue, 22 Aug 2017 21:09:34 +0000 (21:09 +0000)]
Fix crashes in btm_consolidate_dev am: bd8ed367d3 am: 94357d4888
am: 7c962872ca

Change-Id: Ifdc1192dc410c1360118cbc5b1f304793aa8a80b

7 years agoFix crashes in btm_consolidate_dev am: bd8ed367d3
Jakub Pawlowski [Tue, 22 Aug 2017 21:03:49 +0000 (21:03 +0000)]
Fix crashes in btm_consolidate_dev am: bd8ed367d3
am: 94357d4888

Change-Id: Ie6f8837f84571cf9bcdbb25ce2df35a47df73828

7 years agoFix crashes in btm_consolidate_dev
Jakub Pawlowski [Tue, 22 Aug 2017 20:56:46 +0000 (20:56 +0000)]
Fix crashes in btm_consolidate_dev
am: bd8ed367d3

Change-Id: I177f816de4f982936af371463ce60f7c1ac9432c

7 years agoFix crashes in btm_consolidate_dev
Jakub Pawlowski [Tue, 22 Aug 2017 10:10:46 +0000 (03:10 -0700)]
Fix crashes in btm_consolidate_dev

It is not safe to do list_next after list_remove.

Test: sl4a BleStressTest:test_le_pairing
Bug: 31442085
Change-Id: Ib4cb02154684b39ebc652d20559e1b07eee2c357

7 years agoFix connection handle data type am: 73af403370 am: e7a0b2e8c6
Jakub Pawlowski [Fri, 18 Aug 2017 13:14:14 +0000 (13:14 +0000)]
Fix connection handle data type am: 73af403370 am: e7a0b2e8c6
am: fa04921fe1

Change-Id: Ic6a624dc43c11d160f5c6ed258f0073c1bca278b

7 years agoFix connection handle data type am: 73af403370
Jakub Pawlowski [Fri, 18 Aug 2017 13:08:43 +0000 (13:08 +0000)]
Fix connection handle data type am: 73af403370
am: e7a0b2e8c6

Change-Id: Ied30c6eb6d8ca37dc2c19182211ae4a7fc248221

7 years agoFix connection handle data type
Jakub Pawlowski [Fri, 18 Aug 2017 13:03:55 +0000 (13:03 +0000)]
Fix connection handle data type
am: 73af403370

Change-Id: Ic08764d124def613fcbb52fca68a487ded52390f

7 years agoFix connection handle data type
Jakub Pawlowski [Fri, 18 Aug 2017 11:14:22 +0000 (04:14 -0700)]
Fix connection handle data type

conn_handle should be uint16_t, not uint8_t.

Test: compilation test
Bug: 64232952
Change-Id: Ibce88e2cf2f74f402ea26f7471e5ac35aef6229b

7 years agoCleanup RawAddress usage am: 2e05f0dd4f am: 2ff7a2201d
Jakub Pawlowski [Fri, 18 Aug 2017 00:01:49 +0000 (00:01 +0000)]
Cleanup RawAddress usage am: 2e05f0dd4f am: 2ff7a2201d
am: 5b27678c6d

Change-Id: I2f7485845f300cb72319874f0f2bd45ce583a349

7 years agoCleanup RawAddress usage am: 2e05f0dd4f
Jakub Pawlowski [Thu, 17 Aug 2017 23:57:50 +0000 (23:57 +0000)]
Cleanup RawAddress usage am: 2e05f0dd4f
am: 2ff7a2201d

Change-Id: I7b42e630452840cc957858e2abd2e33d2f4ebb27

7 years agoCleanup RawAddress usage
Jakub Pawlowski [Thu, 17 Aug 2017 23:53:48 +0000 (23:53 +0000)]
Cleanup RawAddress usage
am: 2e05f0dd4f

Change-Id: I76258df03bef16cf4a71f3dab2412b89750e0ab7

7 years agoCleanup RawAddress usage
Jakub Pawlowski [Wed, 16 Aug 2017 13:41:02 +0000 (06:41 -0700)]
Cleanup RawAddress usage

Use RawAddress::kLength instead of sizeof(RawAddress). When copying
value using memcpy, use "->address" instead of direct instance address.

Bug: 64726342
Change-Id: Iac7e5674f7e32b53162ab734c2251e65e9d4554c

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41...
Andre Eisenbach [Thu, 17 Aug 2017 01:02:44 +0000 (01:02 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41 am: 8498351370 am: 615de1d1fe  -s ours am: 1ee8850324  -s ours am: 27e67ba277  -s ours am: 5af8ec6e85  -s ours am: bc2ddd916c  -s ours am: ad12cf8070  -s ours am: eb80110ae4  -s ours
am: 672f067faf  -s ours

Change-Id: I4efbd2fe500d309b9211128d785eea8a54d87792

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41...
Andre Eisenbach [Thu, 17 Aug 2017 00:55:44 +0000 (00:55 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41 am: 8498351370 am: 615de1d1fe  -s ours am: 1ee8850324  -s ours am: 27e67ba277  -s ours am: 5af8ec6e85  -s ours am: bc2ddd916c  -s ours am: ad12cf8070  -s ours am: eb80110ae4  -s ours
am: e6902fa770  -s ours

Change-Id: I5d6ce7b101ecf5749c380fcc88b00ed95f284218

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41...
Andre Eisenbach [Thu, 17 Aug 2017 00:53:40 +0000 (00:53 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41 am: 8498351370 am: 615de1d1fe  -s ours am: 1ee8850324  -s ours am: 27e67ba277  -s ours am: 5af8ec6e85  -s ours am: bc2ddd916c  -s ours am: ad12cf8070  -s ours
am: eb80110ae4  -s ours

Change-Id: I66e5cfc1a169c98b877246ff7dc8940d209ea260

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41...
Andre Eisenbach [Thu, 17 Aug 2017 00:53:40 +0000 (00:53 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41 am: 8498351370 am: 615de1d1fe  -s ours am: 1ee8850324  -s ours am: 27e67ba277  -s ours am: 5af8ec6e85  -s ours am: bc2ddd916c  -s ours am: ad12cf8070  -s ours
am: eb80110ae4  -s ours

Change-Id: Ie41f709b2f47fcf629022c561b3c712ae90ac572

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41...
Andre Eisenbach [Thu, 17 Aug 2017 00:51:13 +0000 (00:51 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41 am: 8498351370 am: 615de1d1fe  -s ours am: 1ee8850324  -s ours am: 27e67ba277  -s ours am: 5af8ec6e85  -s ours am: bc2ddd916c  -s ours
am: ad12cf8070  -s ours

Change-Id: I98a440d9bfa53e413c531b2afa510b52c02104cc

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41...
Andre Eisenbach [Thu, 17 Aug 2017 00:49:09 +0000 (00:49 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41 am: 8498351370 am: 615de1d1fe  -s ours am: 1ee8850324  -s ours am: 27e67ba277  -s ours am: 5af8ec6e85  -s ours
am: bc2ddd916c  -s ours

Change-Id: Iad7cf407257de1788102f83e7ceafaf9167655c9

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41...
Andre Eisenbach [Thu, 17 Aug 2017 00:46:40 +0000 (00:46 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41 am: 8498351370 am: 615de1d1fe  -s ours am: 1ee8850324  -s ours am: 27e67ba277  -s ours
am: 5af8ec6e85  -s ours

Change-Id: I8971c22e6641d46e2d1fba13fe55407e3386acb2

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41...
Andre Eisenbach [Thu, 17 Aug 2017 00:45:10 +0000 (00:45 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41 am: 8498351370 am: 615de1d1fe  -s ours am: 1ee8850324  -s ours
am: 27e67ba277  -s ours

Change-Id: I5fb42670d4a641b39a14e538057a0193d33afb0e

7 years agoMerge "SDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd...
Android Build Merger (Role) [Thu, 17 Aug 2017 00:43:06 +0000 (00:43 +0000)]
Merge "SDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd7b0c am: 33aee8d11e am: d772aec66b am: c8d256c052  -s ours am: 7fe92a7abf  -s ours am: 1f1b4d003f  -s ours" into oc-dr1-dev-plus-aosp

7 years agoMerge "SDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd...
Android Build Merger (Role) [Thu, 17 Aug 2017 00:43:01 +0000 (00:43 +0000)]
Merge "SDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd7b0c am: 33aee8d11e am: d772aec66b am: c8d256c052  -s ours am: 7fe92a7abf  -s ours am: 65fc86d417  -s ours" into oc-dr1-dev-plus-aosp

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd7b0c...
Andre Eisenbach [Thu, 17 Aug 2017 00:42:54 +0000 (00:42 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd7b0c am: 33aee8d11e am: d772aec66b am: c8d256c052  -s ours am: 7fe92a7abf  -s ours
am: 1f1b4d003f  -s ours

Change-Id: I0eb482bda56185c2742fb300f607ea001df09ed7

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd7b0c...
Andre Eisenbach [Thu, 17 Aug 2017 00:42:46 +0000 (00:42 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd7b0c am: 33aee8d11e am: d772aec66b am: c8d256c052  -s ours am: 7fe92a7abf  -s ours
am: 65fc86d417  -s ours

Change-Id: Ib4f54de3aa03ca302a3e222c0aa9500ad969b834

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41...
Andre Eisenbach [Thu, 17 Aug 2017 00:42:45 +0000 (00:42 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41 am: 8498351370 am: 615de1d1fe  -s ours
am: 1ee8850324  -s ours

Change-Id: I5f54fca3ea0d17cad9a5e5439265c9b40340036c

7 years agoFix misc-macro-parentheses warnings in system/bt. am: fc25b19606 am: 435140c19f
Chih-Hung Hsieh [Thu, 17 Aug 2017 00:42:31 +0000 (00:42 +0000)]
Fix misc-macro-parentheses warnings in system/bt. am: fc25b19606 am: 435140c19f
am: 8334c3612c

Change-Id: I5069f282fd5d2a1e993f33c66fef7f7e1f25c9f7

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41...
Andre Eisenbach [Thu, 17 Aug 2017 00:39:39 +0000 (00:39 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41 am: 8498351370
am: 615de1d1fe  -s ours

Change-Id: I2e6425620ccf65636ba0b0ba6c783c8bf8764ec0

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41
Andre Eisenbach [Thu, 17 Aug 2017 00:37:42 +0000 (00:37 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f am: 5dc24c7b41
am: 8498351370

Change-Id: I171cafa603f3bf9d6a91895aba461fa96711c18c

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f
Andre Eisenbach [Thu, 17 Aug 2017 00:32:37 +0000 (00:32 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 294cc61f4f
am: 5dc24c7b41

Change-Id: I27dffd6583706912f79cfd730eca390e930e9294

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot()
Andre Eisenbach [Thu, 17 Aug 2017 00:30:38 +0000 (00:30 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot()
am: 294cc61f4f

Change-Id: Ief8d911221408ff79a5addc7a7d58c7ca1a38808

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd7b0c...
Andre Eisenbach [Thu, 17 Aug 2017 00:28:39 +0000 (00:28 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd7b0c am: 33aee8d11e am: d772aec66b am: c8d256c052  -s ours
am: 7fe92a7abf  -s ours

Change-Id: Ie383a65f8f6b2593f4c4bf32cea0179521e351b3

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd7b0c...
Andre Eisenbach [Thu, 17 Aug 2017 00:20:52 +0000 (00:20 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd7b0c am: 33aee8d11e am: d772aec66b am: c8d256c052  -s ours
am: 7fe92a7abf  -s ours

Change-Id: Ied810a83773b7588b09317ce055a55519ec8e80c

7 years agoFix misc-macro-parentheses warnings in system/bt. am: fc25b19606
Chih-Hung Hsieh [Thu, 17 Aug 2017 00:19:18 +0000 (00:19 +0000)]
Fix misc-macro-parentheses warnings in system/bt. am: fc25b19606
am: 435140c19f

Change-Id: I0161b80115cbeb6a5754e54c2c3c7cc89b0ca821

7 years agoFix misc-macro-parentheses warnings in system/bt.
Chih-Hung Hsieh [Thu, 17 Aug 2017 00:09:12 +0000 (00:09 +0000)]
Fix misc-macro-parentheses warnings in system/bt.
am: fc25b19606

Change-Id: I7ef5175514d7f1483743c20c916854f1e4cce687

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd7b0c...
Andre Eisenbach [Thu, 17 Aug 2017 00:03:55 +0000 (00:03 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd7b0c am: 33aee8d11e am: d772aec66b
am: c8d256c052  -s ours

Change-Id: I0c563fdf2b28e8b50abab9f6d9a1b1851a13a2ab

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd7b0c...
Andre Eisenbach [Wed, 16 Aug 2017 23:45:18 +0000 (23:45 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd7b0c am: 33aee8d11e
am: d772aec66b

Change-Id: I41ed5d1d9f8efa504941b7084aa955496dfe0ec3

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd7b0c
Andre Eisenbach [Wed, 16 Aug 2017 23:27:46 +0000 (23:27 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa am: 3b90fd7b0c
am: 33aee8d11e

Change-Id: Ie3991cdfd834d3d0ff736562af300251fd70f96c

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa
Andre Eisenbach [Wed, 16 Aug 2017 23:07:45 +0000 (23:07 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: 82e4754aaa
am: 3b90fd7b0c

Change-Id: I2e9769b83ab39cfc51320b1116959780dd5d92da

7 years agoFix misc-macro-parentheses warnings in system/bt.
Chih-Hung Hsieh [Tue, 1 Aug 2017 22:04:23 +0000 (15:04 -0700)]
Fix misc-macro-parentheses warnings in system/bt.

* Use NOLINT to suppress missing parentheses warnings around bitmask.

Bug: 28705665
Test: make with WITH_TIDY=1 WITH_TIDY_CHECKS=-*,misc-macro-* \
      WITH_TIDY_FLAGS=-header-filter=system/bt/.*

Change-Id: I4f095898d49eafdea9eb72f9ffc9eac87f68a4c8

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot()
Andre Eisenbach [Wed, 16 Aug 2017 22:52:42 +0000 (22:52 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot()
am: 82e4754aaa

Change-Id: Ica0050f493b45e216daa4c31e6eea38a4921d356

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: b413f1b136
Andre Eisenbach [Wed, 16 Aug 2017 17:40:42 +0000 (17:40 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: b413f1b136
am: a708395ce2

Change-Id: I9c853eff3b6982fc183940dc7d586bb7f2802239

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot() am: b413f1b136
Andre Eisenbach [Wed, 16 Aug 2017 17:33:41 +0000 (17:33 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am: b413f1b136
am: 8fdf601167

Change-Id: I1dbc18e8758ef322e809180d3ff81c15909311e5

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot()
Andre Eisenbach [Wed, 16 Aug 2017 17:25:11 +0000 (17:25 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot()
am: b413f1b136

Change-Id: I2a51738b15ab49d419a95a1f14abf87aa2542af1

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot()
Andre Eisenbach [Wed, 16 Aug 2017 17:22:44 +0000 (17:22 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot()
am: b413f1b136

Change-Id: I731b84859091c5580b358678830b59914dad5f42

7 years agoFix errors in handling RawAddresses am: 882aec320e am: 1a6a640a36
Jack He [Wed, 16 Aug 2017 00:45:06 +0000 (00:45 +0000)]
Fix errors in handling RawAddresses am: 882aec320e am: 1a6a640a36
am: e1562503ff

Change-Id: Ifb33c101cd8fde1b4bd11b7aec0903c4244a837a

7 years agoFix errors in handling RawAddresses am: 882aec320e
Jack He [Wed, 16 Aug 2017 00:32:05 +0000 (00:32 +0000)]
Fix errors in handling RawAddresses am: 882aec320e
am: 1a6a640a36

Change-Id: I52bc8277153bc439f652311c2eff00f34f214480

7 years agoFix errors in handling RawAddresses
Jack He [Wed, 16 Aug 2017 00:23:04 +0000 (00:23 +0000)]
Fix errors in handling RawAddresses
am: 882aec320e

Change-Id: If23c7e9bf4231ec3398d0de21c0656a240935209

7 years agoFix errors in handling RawAddresses
Jack He [Tue, 15 Aug 2017 06:02:16 +0000 (23:02 -0700)]
Fix errors in handling RawAddresses

* In change I8d1bd6914aec55bb53495b1d0d5e3d37b86865e6
  memcmp(a, b, LEN) != 0 should be translated to
  A != B
* memcpy should not be applied to RawAddress objects.
  Assignment operator should be used instead.
* memset should not be applied to RawAddress objects.
  Assignment to RawAddress::kEmpty should be used.
* Fixed a crash in GATT

Bug: 64316340
Test: Unit test, pair with device and transmit
Change-Id: Iceefab821c1d45a88194d87a43a192afa5f263fd

7 years agoMerge "test_vendor: Add function to extract bytes from iterators" am: 9a7f50c041...
johnshamoon [Fri, 11 Aug 2017 06:03:20 +0000 (06:03 +0000)]
Merge "test_vendor: Add function to extract bytes from iterators" am: 9a7f50c041 am: 1dcc643f74
am: 8d47bcb5e1

Change-Id: Ia448deb3ab32f43166bba4402f27fb17dbcf408a

7 years agoMerge "test_vendor: Add function to extract bytes from iterators" am: 9a7f50c041
johnshamoon [Fri, 11 Aug 2017 05:59:20 +0000 (05:59 +0000)]
Merge "test_vendor: Add function to extract bytes from iterators" am: 9a7f50c041
am: 1dcc643f74

Change-Id: I5d1f05416df73f3d3f6432a6e1f506fc544a238f

7 years agoMerge "test_vendor: Add function to extract bytes from iterators"
johnshamoon [Fri, 11 Aug 2017 05:54:20 +0000 (05:54 +0000)]
Merge "test_vendor: Add function to extract bytes from iterators"
am: 9a7f50c041

Change-Id: I588d3a7fd6dce5c2eaf1aea9944e4d45663e3dd0

7 years agoMerge "test_vendor: Add function to extract bytes from iterators"
Treehugger Robot [Fri, 11 Aug 2017 05:46:08 +0000 (05:46 +0000)]
Merge "test_vendor: Add function to extract bytes from iterators"

7 years agotest_vendor: Add function to extract bytes from iterators
johnshamoon [Wed, 9 Aug 2017 03:38:28 +0000 (20:38 -0700)]
test_vendor: Add function to extract bytes from iterators

The extract function extracts a number of bytes from the type that the
iterator is pointing to. The iterator will be incremented to the value
after the last byte after extract is called.

Fixed the bounds of the for loop in the preIncrementTest so that it
does not try to dereference the sentinel after the last value.

Test: Passes unit tests in test/iterator_test.cc
Change-Id: I07944641b829c820bbe40d612d7f065e514516b3

7 years agoosi: Suppress length warning in config parsing am: 8b7968085b am: 1b63c106d4
Ting-Yuan Huang [Thu, 10 Aug 2017 18:28:24 +0000 (18:28 +0000)]
osi: Suppress length warning in config parsing am: 8b7968085b am: 1b63c106d4
am: a079f052da

Change-Id: I73b0cee3d1ad82c061fd7b9d725160ce86da193e

7 years agoosi: Suppress length warning in config parsing am: 8b7968085b
Ting-Yuan Huang [Thu, 10 Aug 2017 18:20:47 +0000 (18:20 +0000)]
osi: Suppress length warning in config parsing am: 8b7968085b
am: 1b63c106d4

Change-Id: I6d38fee565d635ba2a9ca89ac3b078b654e3d182

7 years agoosi: Suppress length warning in config parsing
Ting-Yuan Huang [Thu, 10 Aug 2017 18:13:18 +0000 (18:13 +0000)]
osi: Suppress length warning in config parsing
am: 8b7968085b

Change-Id: I338ec794dcc5db22ee4615ef139500c44eb1cf2b

7 years agoosi: Suppress length warning in config parsing
Ting-Yuan Huang [Tue, 9 May 2017 23:35:46 +0000 (16:35 -0700)]
osi: Suppress length warning in config parsing

Bug: 38178471
Test: Built without seeing the warning at the line
Change-Id: I1f8a5fc58313456921891700a3039cad1715b4d0

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot()
Andre Eisenbach [Tue, 8 Aug 2017 23:51:12 +0000 (16:51 -0700)]
SDP: Bounds check 'id' parameter for free_sdp_slot()

Merged-In: I34e8296ec7ec6b4ffbe1fa0452754f2a421e6ec7

Test: manual
Fixes: 37502513
Change-Id: I34e8296ec7ec6b4ffbe1fa0452754f2a421e6ec7
(cherry picked from commit b413f1b1365af4273647727e497848f95312d0ec)

7 years agoSDP: Bounds check 'id' parameter for free_sdp_slot()
Andre Eisenbach [Tue, 8 Aug 2017 22:41:21 +0000 (15:41 -0700)]
SDP: Bounds check 'id' parameter for free_sdp_slot()

Merged-In: I34e8296ec7ec6b4ffbe1fa0452754f2a421e6ec7

Test: manual
Fixes: 37502513
Change-Id: I34e8296ec7ec6b4ffbe1fa0452754f2a421e6ec7
(cherry picked from commit b413f1b1365af4273647727e497848f95312d0ec)

7 years agoresolve merge conflicts of 0a5d9ebb0b15976b47eaff77bb66a257b8b114bb to stage-aosp...
Jakub Pawlowski [Wed, 9 Aug 2017 16:23:37 +0000 (16:23 +0000)]
resolve merge conflicts of 0a5d9ebb0b15976b47eaff77bb66a257b8b114bb to stage-aosp-master am: ca61556a76
am: fe37b1e8f8

Change-Id: Idf45696c975e3c65d955e9a19c446bb471900536