diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-09-16 18:40:42 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-09-19 16:57:42 +0200 |
commit | 2b52ac5dbd63f1511d420f339151b5aa0daec136 (patch) | |
tree | 4787119de634066e9c27a61c7a850d6034835f4f | |
parent | 57a148f332e7b4cd9d828f01c407f6eddf83606a (diff) |
e1inp_line_ipa_rsl_ts(): Return null instead of reading out of bounds
Change-Id: Ic382ab509e4541124f36df153e4b247d9cba35c5
-rw-r--r-- | include/osmocom/abis/e1_input.h | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ struct e1inp_line { 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 { |