summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-01-12 22:59:05 +0600
committerfixeria <vyanitskiy@sysmocom.de>2023-01-17 18:10:55 +0000
commiteb654c07d28446627078cbfb5cbd9f3ceed1ed14 (patch)
tree139122e14fdce35107c8c37ec743e12876ce3228
parent0fe3f7d4e53b8857235b3c2871d153df56af902d (diff)
layer23: fix integer overflow in l1ctl_tx_data_req()
Found by clang: l1ctl.c:397:52: warning: implicit conversion from 'int' to 'int8_t' (aka 'signed char') changes value from 255 to -1 [-Wconstant-conversion] Change-Id: I23e9ea5ad59099c24db60057c8e7da1e6a0d2293
-rw-r--r--src/host/layer23/src/common/l1ctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c
index 2695e534..5ba1a1fb 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -395,7 +395,7 @@ int l1ctl_tx_data_req(struct osmocom_ms *ms, struct msgb *msg,
if (rsl_dec_chan_nr(chan_nr, &chan_type, &chan_ss, &chan_ts) == 0) {
uint8_t gsmtap_chan_type = chantype_rsl2gsmtap2(chan_type, link_id, false);
gsmtap_send(gsmtap_inst, ms->rrlayer.cd_now.arfcn | GSMTAP_ARFCN_F_UPLINK,
- chan_ts, gsmtap_chan_type, chan_ss, 0, 127, 255,
+ chan_ts, gsmtap_chan_type, chan_ss, 0, 127, 0,
msg->l2h, msgb_l2len(msg));
} else {
LOGP(DL1C, LOGL_ERROR,