Message ID | 20230112232112.212021-2-jqian@calamp.com |
---|---|
State | New |
Headers | show |
Series | *** hcidump: fix array boundary issue le_meta_ev_dump *** | expand |
diff --git a/tools/parser/hci.c b/tools/parser/hci.c index db7d32c011b9..30feafaed36c 100644 --- a/tools/parser/hci.c +++ b/tools/parser/hci.c @@ -3657,7 +3657,11 @@ static inline void le_meta_ev_dump(int level, struct frame *frm) frm->len -= EVT_LE_META_EVENT_SIZE; p_indent(level, frm); - printf("%s\n", ev_le_meta_str[subevent]); + if (subevent <= LE_EV_NUM) { + printf("%s\n", ev_le_meta_str[subevent]); + } else { + printf("Undefined--> %d\n", subevent); + } switch (mevt->subevent) { case EVT_LE_CONN_COMPLETE: