pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/29369 )
Change subject: e1inp_line_ipa_rsl_ts(): Return null instead of reading out of bounds ......................................................................
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(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/69/29369/1
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index 29cc942..60f372a 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 {