Fix CVE

Test: NFC enable/disable
Bug: 119223615
Bug: 111699773
Bug: 111660010
(cherry picked from commit 93233eb6f2a9e602c059edc20e26845384432db6)

Change-Id: I573986e876d3f4093a6a829b0f01424072cd9d5a
diff --git a/src/nfc/llcp/llcp_link.c b/src/nfc/llcp/llcp_link.c
index ff81f6b..ffcdc9b 100644
--- a/src/nfc/llcp/llcp_link.c
+++ b/src/nfc/llcp/llcp_link.c
@@ -1189,7 +1189,7 @@
     agf_length = p_agf->len;
     p = (UINT8 *) (p_agf + 1) + p_agf->offset;
 
-    while (agf_length > 0)
+    while (agf_length >= LLCP_PDU_HEADER_SIZE)
     {
         /* get length of PDU */
         p_pdu_length = p;
diff --git a/src/nfc/llcp/llcp_util.c b/src/nfc/llcp/llcp_util.c
index 9585845..8f6a557 100644
--- a/src/nfc/llcp/llcp_util.c
+++ b/src/nfc/llcp/llcp_util.c
@@ -585,7 +585,6 @@
 
         default:
             LLCP_TRACE_ERROR1 ("llcp_util_parse_connect (): Unexpected type 0x%x", param_type);
-            BE_STREAM_TO_UINT8 (param_len, p);
             p += param_len;
             break;
         }