Fix SVace issue. 13/137213/1 accepted/tizen/3.0/common/20170719.081557 accepted/tizen/3.0/ivi/20170719.003635 accepted/tizen/3.0/mobile/20170719.003600 accepted/tizen/3.0/tv/20170719.003611 accepted/tizen/3.0/wearable/20170719.003622 submit/tizen_3.0/20170716.235230
authorDeokhyun Kim <dukan.kim@samsung.com>
Wed, 5 Jul 2017 02:05:36 +0000 (11:05 +0900)
committerDeokhyun Kim <dukan.kim@samsung.com>
Wed, 5 Jul 2017 02:05:36 +0000 (11:05 +0900)
Change-Id: I625793c394c093c37ec6ab9c9b8ade2af85369b3
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
src/bluetooth-tds.c

index ab3c2751b7e9440a4e81d24c1a1e86daa7dbd470..5a9a7e68ae2e634391f4f4b1d446fe1ed93ebfea 100644 (file)
@@ -239,7 +239,7 @@ int bt_tds_provider_set_transport_data(bt_tds_provider_h provider,
        if (!tds_provider_registered)
                return BT_ERROR_NOT_INITIALIZED;
 
-       if (255 < length) {
+       if (0 >= length || 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;