[Bluetooth][Non-ACR] Fix the crash in GetBondedDevices API (#1643)
authordh79pyun <31202060+dh79pyun@users.noreply.github.com>
Tue, 2 Jun 2020 01:48:47 +0000 (10:48 +0900)
committerGitHub <noreply@github.com>
Tue, 2 Jun 2020 01:48:47 +0000 (10:48 +0900)
commitb06a61db32a12878fc8f847b2f7888614ffbb358
tree1fe3b5e218652b3977d6a152349223c90d891245
parentcf19b5aa546b097a39401e4d4b2d11381e1fcc6a
[Bluetooth][Non-ACR] Fix the crash in GetBondedDevices API (#1643)

The manufacture data can be filled without NULL termination.
Because it is the byte array type. So we should define it as
IntPrt instead of string to avoid the buffer overflow.

Exception !!!: System.Runtime.InteropServices.COMException (0x8007007A): The data area passed to a system call is too small.
at System.StubHelpers.ValueClassMarshaler.ConvertToNative(IntPtr dst, IntPtr src, IntPtr pMT, CleanupWorkListElement& pCleanupWorkList)
at Tizen.Network.Bluetooth.BluetoothAdapterImpl.GetBondedDevices()
at Tizen.Network.Bluetooth.BluetoothAdapter.GetBondedDevices()

Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothStructs.cs