pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/29502 ) Change subject: osmux: assert no batch factor greater than 8 is used ...................................................................... osmux: assert no batch factor greater than 8 is used Change-Id: Ie17a8174bc220d091cb7ff880363d22179b4f621 --- M src/osmux.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/osmux.c b/src/osmux.c index 2a5dcc9..9ac0a7e 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -318,7 +318,8 @@ /* Validate amount of messages per batch. The counter field of the * osmux header is just 3 bits long, so make sure it doesn't overflow. */ - if (circuit->nmsgs >= batch_factor || circuit->nmsgs >= 8) { + OSMO_ASSERT(batch_factor <= 8); + if (circuit->nmsgs >= batch_factor) { struct rtp_hdr *rtph; rtph = osmo_rtp_get_hdr(msg); -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/29502 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Ie17a8174bc220d091cb7ff880363d22179b4f621 Gerrit-Change-Number: 29502 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged