@@ -2028,6 +2028,11 @@ int bt_iso_cig_create(const struct bt_iso_cig_param *param, struct bt_iso_cig **
2028
2028
bool advanced = false;
2029
2029
int i ;
2030
2030
2031
+ CHECKIF (param == NULL ) {
2032
+ LOG_DBG ("param is NULL" );
2033
+ return - EINVAL ;
2034
+ }
2035
+
2031
2036
CHECKIF (out_cig == NULL ) {
2032
2037
LOG_DBG ("out_cig is NULL" );
2033
2038
return - EINVAL ;
@@ -2145,6 +2150,11 @@ int bt_iso_cig_reconfigure(struct bt_iso_cig *cig, const struct bt_iso_cig_param
2145
2150
return - EINVAL ;
2146
2151
}
2147
2152
2153
+ CHECKIF (param == NULL ) {
2154
+ LOG_DBG ("param is NULL" );
2155
+ return - EINVAL ;
2156
+ }
2157
+
2148
2158
if (cig -> state != BT_ISO_CIG_STATE_CONFIGURED ) {
2149
2159
LOG_DBG ("Invalid CIG state: %u" , cig -> state );
2150
2160
return - EINVAL ;
@@ -2891,6 +2901,21 @@ int bt_iso_big_create(struct bt_le_ext_adv *padv, struct bt_iso_big_create_param
2891
2901
struct bt_iso_big * big ;
2892
2902
bool advanced = false;
2893
2903
2904
+ CHECKIF (padv == NULL ) {
2905
+ LOG_DBG ("padv is NULL" );
2906
+ return - EINVAL ;
2907
+ }
2908
+
2909
+ CHECKIF (param == NULL ) {
2910
+ LOG_DBG ("param is NULL" );
2911
+ return - EINVAL ;
2912
+ }
2913
+
2914
+ CHECKIF (out_big == NULL ) {
2915
+ LOG_DBG ("out_big is NULL" );
2916
+ return - EINVAL ;
2917
+ }
2918
+
2894
2919
if (!atomic_test_bit (padv -> flags , BT_PER_ADV_PARAMS_SET )) {
2895
2920
LOG_DBG ("PA params not set; invalid adv object" );
2896
2921
return - EINVAL ;
@@ -3077,6 +3102,11 @@ int bt_iso_big_terminate(struct bt_iso_big *big)
3077
3102
struct bt_iso_chan * bis ;
3078
3103
int err ;
3079
3104
3105
+ CHECKIF (big == NULL ) {
3106
+ LOG_DBG ("big is NULL" );
3107
+ return - EINVAL ;
3108
+ }
3109
+
3080
3110
if (!atomic_test_bit (big -> flags , BT_BIG_INITIALIZED ) || !big -> num_bis ) {
3081
3111
LOG_DBG ("BIG not initialized" );
3082
3112
return - EINVAL ;
@@ -3255,6 +3285,21 @@ int bt_iso_big_sync(struct bt_le_per_adv_sync *sync, struct bt_iso_big_sync_para
3255
3285
struct bt_iso_chan * bis ;
3256
3286
struct bt_iso_big * big ;
3257
3287
3288
+ CHECKIF (sync == NULL ) {
3289
+ LOG_DBG ("sync is NULL" );
3290
+ return - EINVAL ;
3291
+ }
3292
+
3293
+ CHECKIF (param == NULL ) {
3294
+ LOG_DBG ("param is NULL" );
3295
+ return - EINVAL ;
3296
+ }
3297
+
3298
+ CHECKIF (out_big == NULL ) {
3299
+ LOG_DBG ("out_big is NULL" );
3300
+ return - EINVAL ;
3301
+ }
3302
+
3258
3303
if (!atomic_test_bit (sync -> flags , BT_PER_ADV_SYNC_SYNCED )) {
3259
3304
LOG_DBG ("PA sync not synced" );
3260
3305
return - EINVAL ;
0 commit comments