This patch amends the upper limit for TDS buffer length,
while checking for Out of range values.
Change-Id: I9f4581e14a6a03be2864c8b431dc53a01a835231
Signed-off-by: Atul Rai <a.rai@samsung.com>
if (!tds_provider_registered)
return BT_ERROR_NOT_INITIALIZED;
- if (255 < length) {
+ if (BLUETOOTH_TDS_DATA_LENGTH_MAX < length) {
error_code = BT_ERROR_INVALID_PARAMETER;
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), error_code);
return error_code;