lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/43130?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: firmware: sniffer: do not drop maximum-length ATRs ...................................................................... firmware: sniffer: do not drop maximum-length ATRs 7816-3 8.1/8.2.1 allow TS plus 32 bytes. atr_i is a byte count, not an index, process_byte_atr() guards its own store with the same condition before incrementing, so atr_i reaches 33. Change-Id: Ic8398cbefc0b522946b6470fd0268fa70662dab1 --- M firmware/libcommon/source/sniffer.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified lynxis lazus: Looks good to me, approved diff --git a/firmware/libcommon/source/sniffer.c b/firmware/libcommon/source/sniffer.c index 419e8fb..98cc6cd 100644 --- a/firmware/libcommon/source/sniffer.c +++ b/firmware/libcommon/source/sniffer.c @@ -406,7 +406,7 @@ TRACE_WARNING("Can't print ATR in ISO 7816-3 state %u\n\r", iso_state); return; } - if (g_atr.atr_i >= ARRAY_SIZE(g_atr.atr)) { + if (g_atr.atr_i > ARRAY_SIZE(g_atr.atr)) { TRACE_ERROR("ATR buffer overflow\n\r"); return; } -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/43130?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ic8398cbefc0b522946b6470fd0268fa70662dab1 Gerrit-Change-Number: 43130 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen <ewild@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu>