[Bluetooth][Bugfix] Copy value we don't own before passing to a worker 85/244185/1
authorPawel Wasowski <p.wasowski2@samsung.com>
Tue, 15 Sep 2020 15:24:04 +0000 (17:24 +0200)
committerPawel Wasowski <p.wasowski2@samsung.com>
Tue, 15 Sep 2020 15:47:27 +0000 (17:47 +0200)
commit350e3ae05b6ddbc6f1be20adbbe3b5db5fa617a0
treef3fae76658409656cdbcea65e8469b80b9681f19
parent10f6001aa4e220bbfc5773c8cf677bf40b3111e4
[Bluetooth][Bugfix] Copy value we don't own before passing to a worker

const char *remote_address is passed as an argument from
Native API to our callback, that adds a job to the Bluetooth's
worker.
Previously, the remote_address pointer was passed straight
to the worker. When referenced, it was already garbage.
This commit adds a copy of this value, so that the worker gets
proper data.

[Validation] Tested in Chrome DevTools. remoteAddress in JS is
a valid MAC address.

Change-Id: Id571296861775fee70d93ca94c4da0b496f9d3c8
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
src/bluetooth/bluetooth_gatt_server_service.cc