From 130545687177972de8ba22eacb4c21ae1be55d05 Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Wed, 28 Dec 2022 13:45:11 +0900 Subject: [PATCH] [Bluetooth] Fix overflow issue (#4872) --- .../Tizen.Network.Bluetooth/BluetoothLeAdapterImpl.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothLeAdapterImpl.cs b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothLeAdapterImpl.cs index 77ea945..890c80e 100644 --- a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothLeAdapterImpl.cs +++ b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothLeAdapterImpl.cs @@ -337,7 +337,7 @@ namespace Tizen.Network.Bluetooth int sizePointerToABC = Marshal.SizeOf(new BluetoothLeServiceDataStruct()); for (int i = 0; i < _serviceListCount; i++) { - var svc = (BluetoothLeServiceDataStruct)Marshal.PtrToStructure(new IntPtr(serviceListArray.ToInt32() + (i * sizePointerToABC)), typeof(BluetoothLeServiceDataStruct)); + var svc = (BluetoothLeServiceDataStruct)Marshal.PtrToStructure(IntPtr.Add(serviceListArray, (i * sizePointerToABC)), typeof(BluetoothLeServiceDataStruct)); list.Add(BluetoothUtils.ConvertStructToLeServiceData(svc)); } -- 2.7.4