diff --git a/src/xrt/drivers/wmr/wmr_controller_base.c b/src/xrt/drivers/wmr/wmr_controller_base.c index 04b6e7b9b..53c526e9f 100644 --- a/src/xrt/drivers/wmr/wmr_controller_base.c +++ b/src/xrt/drivers/wmr/wmr_controller_base.c @@ -294,7 +294,7 @@ read_controller_config(struct wmr_controller_base *wcb) // Read config block ret = wmr_read_fw_block(wcb, 0x02, &data, &data_size); - if (ret < 0 || data == NULL) + if (ret < 0 || data == NULL || data_size < 2) return false; /* De-obfuscate the JSON config */