Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26bb48d9 authored by Alisher Alikhodjaev's avatar Alisher Alikhodjaev Committed by Automerger Merge Worker
Browse files

Merge "Out of bounds read in hal_core_initialized" into rvc-qpr-dev am:...

Merge "Out of bounds read in hal_core_initialized" into rvc-qpr-dev am: 14162741 am: 57fc6485 am: 8716375c

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/14204915

Change-Id: Ibdf1aff8680374e4ee13af57d162910b154b8f5e
parents fa7082c1 8716375c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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)  {
::android::hardware::Return<NfcStatus> Nfc::coreInitialized(const hidl_vec<uint8_t>& data)  {
    hidl_vec<uint8_t> copy = data;
    hidl_vec<uint8_t> copy = data;


    if (mDevice == nullptr) {
    if (mDevice == nullptr || copy.size() == 0) {
        return NfcStatus::FAILED;
        return NfcStatus::FAILED;
    }
    }
    int ret = mDevice->core_initialized(mDevice, &copy[0]);
    int ret = mDevice->core_initialized(mDevice, &copy[0]);