btm: Restrict EXTENDED_INQUIRY_RESULT to 1 result

The spec only allows one result per event.
Abort processing and return if the spec is not followed.

Bug: 29141745
Change-Id: Ic414b28adadec274779b0d953d12d499a619aff6
Signed-off-by: Myles Watson <mylesgw@google.com>
diff --git a/stack/btm/btm_inq.c b/stack/btm/btm_inq.c
index c160084..d315c11 100644
--- a/stack/btm/btm_inq.c
+++ b/stack/btm/btm_inq.c
@@ -1874,6 +1874,12 @@
 
     STREAM_TO_UINT8 (num_resp, p);
 
+    if (inq_res_mode == BTM_INQ_RESULT_EXTENDED && (num_resp > 1)) {
+        BTM_TRACE_ERROR ("btm_process_inq_results() extended results (%d) > 1",
+                         num_resp);
+        return;
+    }
+
     for (xx = 0; xx < num_resp; xx++)
     {
         update = FALSE;