Merge "Heap-buffer-overflow in nci_proc_ee_management_rsp" into sc-dev am: 096811e966

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/nfc/+/14390457

Change-Id: Ic055ea47b57131dfdc2f960653e67e5df28f04df
diff --git a/src/nfc/nci/nci_hrcv.cc b/src/nfc/nci/nci_hrcv.cc
index 6dc1ae4..dfa16e4 100644
--- a/src/nfc/nci/nci_hrcv.cc
+++ b/src/nfc/nci/nci_hrcv.cc
@@ -356,6 +356,8 @@
         nfc_response.mode_set.status = *pp;
       } else {
         nfc_response.mode_set.status = NFC_STATUS_FAILED;
+        android_errorWriteLog(0x534e4554, "176203800");
+        return;
       }
       nfc_response.mode_set.nfcee_id = *p_old++;
       nfc_response.mode_set.mode = *p_old++;