From c755c1d1b02d748cf27cc805d37553894816833a Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 27 Oct 2017 14:58:26 +0200 Subject: osmo_sccp_addr_encode(): Fix truncation of point codes In osmo_sccp_addr_encode(), we accidentially truncated all point codes to 10 bits, where in reality we should have truncated them to 14 bits: One 'f' was missing in the bit-mask. Closes: OS#2441 Change-Id: Iad67b674b5b5fd41996aa898a131e98900842dd8 --- src/sccp2sua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sccp2sua.c b/src/sccp2sua.c index e435d9f..ac2b2c2 100644 --- a/src/sccp2sua.c +++ b/src/sccp2sua.c @@ -245,7 +245,7 @@ int osmo_sccp_addr_encode(struct msgb *msg, const struct osmo_sccp_addr *in) LOGP(DLSUA, LOGL_ERROR, "Invalid Point Code %u requested\n", in->pc); return -EINVAL; } - msgb_put_u16le(msg, in->pc & 0x3ff); + msgb_put_u16le(msg, in->pc & 0x3fff); } if (in->presence & OSMO_SCCP_ADDR_T_SSN) { -- cgit v1.2.3