diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c index be0db9920..b46a80e7f 100644 --- a/openbsc/src/libmgcp/mgcp_osmux.c +++ b/openbsc/src/libmgcp/mgcp_osmux.c @@ -543,7 +543,7 @@ int osmux_send_dummy(struct mgcp_endpoint *endp) } /* bsc-nat allocates/releases the Osmux circuit ID */ -static uint8_t osmux_cid_bitmap[16]; +static uint8_t osmux_cid_bitmap[(OSMUX_CID_MAX + 1) / 8]; int osmux_used_cid(void) { diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c index ec86c55a9..6c94002de 100644 --- a/openbsc/tests/mgcp/mgcp_test.c +++ b/openbsc/tests/mgcp/mgcp_test.c @@ -1186,7 +1186,7 @@ static void test_osmux_cid(void) osmux_put_cid(id); OSMO_ASSERT(osmux_used_cid() == 0); - for (i = 0; i < 128; ++i) { + for (i = 0; i < 256; ++i) { id = osmux_get_cid(); OSMO_ASSERT(id == i); OSMO_ASSERT(osmux_used_cid() == i + 1);