[PATCH] osmo-hlr[master]: vty: fix output of empty IMSI

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon Oct 23 16:46:48 UTC 2017


Review at  https://gerrit.osmocom.org/4388

vty: fix output of empty IMSI

Check *subscr->imsi, not subscr->imsi, since it is a char[]; same as msisdn
below already does.

Fixes: coverity CID 178166
Change-Id: I72e13efefbac0495b8dd1949a39fa44ebfd46b56
---
M src/hlr_vty_subscr.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/88/4388/1

diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c
index 5704922..0a9ba76 100644
--- a/src/hlr_vty_subscr.c
+++ b/src/hlr_vty_subscr.c
@@ -43,7 +43,7 @@
 
 	vty_out(vty, "    ID: %"PRIu64"%s", subscr->id, VTY_NEWLINE);
 
-	vty_out(vty, "    IMSI: %s%s", subscr->imsi ? subscr->imsi : "none", VTY_NEWLINE);
+	vty_out(vty, "    IMSI: %s%s", *subscr->imsi ? subscr->imsi : "none", VTY_NEWLINE);
 	vty_out(vty, "    MSISDN: %s%s", *subscr->msisdn ? subscr->msisdn : "none", VTY_NEWLINE);
 	if (*subscr->vlr_number)
 		vty_out(vty, "    VLR number: %s%s", subscr->vlr_number, VTY_NEWLINE);

-- 
To view, visit https://gerrit.osmocom.org/4388
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72e13efefbac0495b8dd1949a39fa44ebfd46b56
Gerrit-PatchSet: 1
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>


More information about the gerrit-log mailing list