Merge "Out of bounds read in hal_core_initialized" into rvc-qpr-dev
This commit is contained in:
commit
14162741e7
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ Nfc::Nfc(nfc_nci_device_t* device) : mDevice(device) {}
|
|||
::android::hardware::Return<NfcStatus> Nfc::coreInitialized(const hidl_vec<uint8_t>& data) {
|
||||
hidl_vec<uint8_t> copy = data;
|
||||
|
||||
if (mDevice == nullptr) {
|
||||
if (mDevice == nullptr || copy.size() == 0) {
|
||||
return NfcStatus::FAILED;
|
||||
}
|
||||
int ret = mDevice->core_initialized(mDevice, ©[0]);
|
||||
|
|
Loading…
Reference in a new issue