The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

d/wmr: Fix crash on invalid firmware

Don't access invalid memory on a short firmware read.

authored by

Jan Schmidt and committed by
Jakob Bornecrantz
f33326e9 d326ff98

+1 -1
+1 -1
src/xrt/drivers/wmr/wmr_controller_base.c
··· 294 294 295 295 // Read config block 296 296 ret = wmr_read_fw_block(wcb, 0x02, &data, &data_size); 297 - if (ret < 0 || data == NULL) 297 + if (ret < 0 || data == NULL || data_size < 2) 298 298 return false; 299 299 300 300 /* De-obfuscate the JSON config */