Max has uploaded this change for review. ( https://gerrit.osmocom.org/11707
Change subject: SS7: safeguard against wrong number of pointcode component ...................................................................... SS7: safeguard against wrong number of pointcode component Previously internal function get_pc_comp_shift() returned negative error code when called with wrong component number despite unsinged return value which wasn't checked for error anyway. Fix this by using explicit assert in the error path. This should not affect external users because this function always called with constant component argument. Change-Id: Ib24cdbcf614bad68f3cfa9776a451c5c1e45ae6e --- M src/osmo_ss7.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/07/11707/1 diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 9805b3b..c493672 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -198,7 +198,8 @@ case 2: return 0; default: - return -EINVAL; + /* Invalid number of components */ + OSMO_ASSERT(false); } } -- To view, visit https://gerrit.osmocom.org/11707 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib24cdbcf614bad68f3cfa9776a451c5c1e45ae6e Gerrit-Change-Number: 11707 Gerrit-PatchSet: 1 Gerrit-Owner: Max <msur...@sysmocom.de>