am 66e02987: am d58dee86: Protect from malformed advt with invalid manf_id/data combo
* commit '66e02987b45cb9d04c6bca790dcb3da612e81529': Protect from malformed advt with invalid manf_id/data combo
This commit is contained in:
committed by
Android Git Automerger
commit
b8035fda5d
@@ -257,9 +257,11 @@ public final class ScanRecord {
|
||||
}
|
||||
return new ScanRecord(serviceUuids, manufacturerData, serviceData,
|
||||
advertiseFlag, txPowerLevel, localName, scanRecord);
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "unable to parse scan record: " + Arrays.toString(scanRecord));
|
||||
return null;
|
||||
// As the record is invalid, ignore all the parsed results for this packet
|
||||
// and return an empty record with raw scanRecord bytes in results
|
||||
return new ScanRecord(null, null, null, -1, Integer.MIN_VALUE, null, scanRecord);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user