OOBR in AnalyzeMfcResp in NxpMfcReader.cc

Bug: 252763983
Test: build ok
Merged-In: I91fa035ca6245e6039eeedb447d7e3306b7aebc5
Change-Id: I20b718a74afd2f4de23ee59716601f82190ea3f0
(cherry picked from commit on googleplex-android-review.googlesource.com host: 67e1db04f568cf50c90758272ceca93426aba932)
Merged-In: I20b718a74afd2f4de23ee59716601f82190ea3f0
diff --git a/halimpl/mifare/NxpMfcReader.cc b/halimpl/mifare/NxpMfcReader.cc
index d5e2f74..de3b966 100644
--- a/halimpl/mifare/NxpMfcReader.cc
+++ b/halimpl/mifare/NxpMfcReader.cc
@@ -350,6 +350,10 @@
     } break;
 
     case eMfcAuthRsp: {
+      if (*pBufflen < 2) {
+        status = NFCSTATUS_FAILED;
+        break;
+      }
       /* check the status byte */
       if (NFCSTATUS_SUCCESS == pBuff[1]) {
         status = NFCSTATUS_SUCCESS;