Merge pull request #140 from swilson/master

Fix crash caused by incorrectly formatted (e.g. 1 byte) device reports.
This commit is contained in:
hathach authored and GitHub committed 2018-04-06 23:17:20 +07:00
commit a07fbec136
1 file changed
+2
@@ -147,6 +147,8 @@ uint8_t BLEScanner::parseReportByType(const uint8_t* scandata, uint8_t scanlen,
uint8_t len = 0;
uint8_t const* ptr = NULL;
if ( scanlen < 2 ) return 0;
// len (1+data), type, data
while ( scanlen )
{