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

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

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


Neels Hofmeyr has submitted this change and it was merged.

Change subject: vty: fix output of empty IMSI
......................................................................


vty: fix output of empty IMSI

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

Was introduced in change I42b3b70a0439a8f2e4964d7cc31e593c1f0d7537 / commit
183e7009afc8577f0d89c99f92a5720697040494.

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

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



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: merged
Gerrit-Change-Id: I72e13efefbac0495b8dd1949a39fa44ebfd46b56
Gerrit-PatchSet: 2
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list