pespin has uploaded this change for review. ( 
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(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/02/29502/1

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 <[email protected]>
Gerrit-MessageType: newchange

Reply via email to