[XS] Change in osmo-bsc[master]: sigtran: Assert ss7 instance is found when msc->a.cs7_instance_valid ...
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/44229?usp=email ) Change subject: sigtran: Assert ss7 instance is found when msc->a.cs7_instance_valid == true ...................................................................... sigtran: Assert ss7 instance is found when msc->a.cs7_instance_valid == true cs7_instance_valid is only set to true during VTY paths where msc->a.cs7_instance was found and holds a valid pointer. Hence, in that path osmo_ss7_instance_find(msc->a.cs7_instance) must return a valid pointer too. Later on in the same function, s7i was being used/dereferenced, and coverity mentioned the possibility of it being NULL. The assert in the path mentioned above fixes that possibility. Related: Coverity CID#567671 Change-Id: If43c03f95c31aaec726057968a045623199b35d7 --- M src/osmo-bsc/osmo_bsc_sigtran.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/29/44229/1 diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index c91b725..8f566a4 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -722,6 +722,7 @@ msc->a.cs7_instance_valid = true; } else { s7i = osmo_ss7_instance_find(msc->a.cs7_instance); + OSMO_ASSERT(s7i); } /* User didn't configure an 'msc-addr' in VTY for this msc, add -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/44229?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: If43c03f95c31aaec726057968a045623199b35d7 Gerrit-Change-Number: 44229 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de>
participants (1)
-
pespin