This patchset resolves 'stringop-truncation' build
error for ASAN
Change-Id: If01bdf1441b15517c52476d047bbc3803ae9c7e1
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
if (src->device_name) {
dest->added_features |= BLUETOOTH_LE_SCAN_FILTER_FEATURE_DEVICE_NAME;
strncpy(dest->device_name, src->device_name,
- BLUETOOTH_ADVERTISING_DATA_LENGTH_MAX);
+ BLUETOOTH_ADVERTISING_DATA_LENGTH_MAX - 1);
dest->device_name[BLUETOOTH_ADVERTISING_DATA_LENGTH_MAX - 1] = '\0';
}