Issue with ASYNC detection caused infinite loop if a 21x 0xF 1x 0x0 async was preceded by one or more 0xF nibbles. Patch ensures 0xF sync nibble count capped at 21.
Reported by subhasish.k2301@gmail.com.
Signed-off-by: Mike Leach mike.leach@linaro.org --- decoder/include/opencsd/stm/trc_pkt_proc_stm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/decoder/include/opencsd/stm/trc_pkt_proc_stm.h b/decoder/include/opencsd/stm/trc_pkt_proc_stm.h index 909ac0c..bc4391b 100644 --- a/decoder/include/opencsd/stm/trc_pkt_proc_stm.h +++ b/decoder/include/opencsd/stm/trc_pkt_proc_stm.h @@ -239,7 +239,8 @@ inline void TrcPktProcStm::checkSyncNibble()
if((m_nibble == 0) && (m_num_F_nibbles >= 21)) { - m_is_sync = true; //this nibble marks a sync sequence - keep the F nibble count + m_is_sync = true; //this nibble marks a sync sequence + m_num_F_nibbles = 21; // set the F nibble count - lose any extra as unsynced data. } else {