pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-sigtran/+/43442?usp=email )

Change subject: xua_snm: Fix mask_from_affected_pc() always returning 0
......................................................................

xua_snm: Fix mask_from_affected_pc() always returning 0

A recent commit adding the mask_from_affected_pc() mistyped the aff_pc
converting it to a uint8_t, which is wrong. Fix it.

Related: Coverity CID#563282
Related: OS#7078
Fixes: 41af6a55110d6ddc5febce71d5bba3cf0f33f27e
Change-Id: Id376528802662b8ea53845158e73a1f730e6c590
---
M src/xua_snm.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  osmith: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/src/xua_snm.c b/src/xua_snm.c
index 3aa067e..609cd95 100644
--- a/src/xua_snm.c
+++ b/src/xua_snm.c
@@ -53,7 +53,7 @@
  * This prevents creating incorrect bitmasks and ending up in long loops based 
on peer
  * inputting unexpected big values (ie. >14 on ITU and >24 on ANSI).
  */
-static uint8_t mask_from_affected_pc(const struct osmo_ss7_instance *s7i, 
uint8_t aff_pc)
+static uint8_t mask_from_affected_pc(const struct osmo_ss7_instance *s7i, 
uint32_t aff_pc)
 {
        const uint8_t pc_width = osmo_ss7_pc_width(&s7i->cfg.pc_fmt);
        uint8_t mask = aff_pc >> 24;

--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43442?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Id376528802662b8ea53845158e73a1f730e6c590
Gerrit-Change-Number: 43442
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>

Reply via email to