fixeria submitted this change.

View Change

Approvals: dexter: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified
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
---
M src/host/layer23/src/common/l1ctl.c
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c
index 2695e53..5ba1a1f 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -395,7 +395,7 @@
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,

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I23e9ea5ad59099c24db60057c8e7da1e6a0d2293
Gerrit-Change-Number: 30962
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier@sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-CC: neels <nhofmeyr@sysmocom.de>
Gerrit-MessageType: merged