Commit 47f6aec 1 parent 1d9f1e3 commit 47f6aec Copy full SHA for 47f6aec
File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -3225,6 +3225,9 @@ IRECV_API irecv_error_t irecv_devices_get_device_by_client(irecv_client_t client
3225
3225
#else
3226
3226
int i = 0 ;
3227
3227
3228
+ if (!client || !device )
3229
+ return IRECV_E_INVALID_INPUT ;
3230
+
3228
3231
* device = NULL ;
3229
3232
3230
3233
if (client -> device_info .cpid == 0 ) {
@@ -3245,6 +3248,9 @@ IRECV_API irecv_error_t irecv_devices_get_device_by_client(irecv_client_t client
3245
3248
IRECV_API irecv_error_t irecv_devices_get_device_by_product_type (const char * product_type , irecv_device_t * device ) {
3246
3249
int i = 0 ;
3247
3250
3251
+ if (!product_type || !device )
3252
+ return IRECV_E_INVALID_INPUT ;
3253
+
3248
3254
* device = NULL ;
3249
3255
3250
3256
for (i = 0 ; irecv_devices [i ].product_type != NULL ; i ++ ) {
@@ -3260,6 +3266,9 @@ IRECV_API irecv_error_t irecv_devices_get_device_by_product_type(const char* pro
3260
3266
IRECV_API irecv_error_t irecv_devices_get_device_by_hardware_model (const char * hardware_model , irecv_device_t * device ) {
3261
3267
int i = 0 ;
3262
3268
3269
+ if (!hardware_model || !device )
3270
+ return IRECV_E_INVALID_INPUT ;
3271
+
3263
3272
* device = NULL ;
3264
3273
3265
3274
/* lowercase hardware_model string for proper lookup */
You can’t perform that action at this time.
0 commit comments