Merge e0698f362cf6fef74f2504e63b8844dedce85275 on remote branch

Change-Id: I1d0be296949a260c7c0dd35fea92d7706a089cee
diff --git a/src/nfc/nci/nci_hrcv.cc b/src/nfc/nci/nci_hrcv.cc
index 9329771..7dfa408 100644
--- a/src/nfc/nci/nci_hrcv.cc
+++ b/src/nfc/nci/nci_hrcv.cc
@@ -26,6 +26,7 @@
 
 #include <android-base/stringprintf.h>
 #include <base/logging.h>
+#include <log/log.h>
 
 #include "nfc_target.h"
 
@@ -252,6 +253,11 @@
       break;
 
     case NCI_MSG_RF_DEACTIVATE:
+      if (p_msg->len < 5) {
+        /* NCI_HEADER(3) + Deactivation Type(1) + Deactivation Reason(1) */
+        android_errorWriteLog(0x534e4554, "164440989");
+        return;
+      }
       if (nfa_dm_p2p_prio_logic(op_code, pp, NFA_DM_P2P_PRIO_NTF) == false) {
         return;
       }