pespin submitted this change.

View Change

Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve
e1inp_line_ipa_rsl_ts(): Return null instead of reading out of bounds

Change-Id: Ic382ab509e4541124f36df153e4b247d9cba35c5
---
M include/osmocom/abis/e1_input.h
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h
index 0daf792..91a71e1 100644
--- a/include/osmocom/abis/e1_input.h
+++ b/include/osmocom/abis/e1_input.h
@@ -229,7 +229,7 @@
int pcap_fd;
};
#define e1inp_line_ipa_oml_ts(line) (&line->ts[0])
-#define e1inp_line_ipa_rsl_ts(line, trx_id) (&line->ts[1 + (trx_id)])
+#define e1inp_line_ipa_rsl_ts(line, trx_id) (((1 + (trx_id)) < NUM_E1_TS) ? (&line->ts[1 + (trx_id)]) : NULL)

/* SS_L_INPUT signals */
enum e1inp_signal_input {

To view, visit change 29369. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ic382ab509e4541124f36df153e4b247d9cba35c5
Gerrit-Change-Number: 29369
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-CC: neels <nhofmeyr@sysmocom.de>
Gerrit-MessageType: merged