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/.
keith gerrit-no-reply at lists.osmocom.orgkeith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/20534 )
Change subject: Prevent Crash in show pdp-context from vty
......................................................................
Prevent Crash in show pdp-context from vty
Don't compare EOF with 'true' which resulted in calling
show_one_pdp() with an uninitialised pdp_t
Change-Id: Ic40429939b185f97c020dd3904e054fe860b91e8
---
M ggsn/ggsn_vty.c
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/34/20534/1
diff --git a/ggsn/ggsn_vty.c b/ggsn/ggsn_vty.c
index 5e4feae..d074c20 100644
--- a/ggsn/ggsn_vty.c
+++ b/ggsn/ggsn_vty.c
@@ -929,13 +929,15 @@
if (argc > 2) {
nsapi = atoi(argv[2]);
- if (gtp_pdp_getimsi(ggsn->gsn, &pdp, imsi, nsapi)) {
+ /* Below returns 0 if found, EOF if not found */
+ if (0 == gtp_pdp_getimsi(ggsn->gsn, &pdp, imsi, nsapi)) {
show_one_pdp(vty, pdp);
num_found++;
}
} else {
for (nsapi = 0; nsapi < PDP_MAXNSAPI; nsapi++) {
- if (gtp_pdp_getimsi(ggsn->gsn, &pdp, imsi, nsapi))
+ /* Below returns EOF if not found. */
+ if (EOF == gtp_pdp_getimsi(ggsn->gsn, &pdp, imsi, nsapi))
continue;
show_one_pdp(vty, pdp);
num_found++;
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/20534
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Ic40429939b185f97c020dd3904e054fe860b91e8
Gerrit-Change-Number: 20534
Gerrit-PatchSet: 1
Gerrit-Owner: keith <keith at rhizomatica.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201011/0417c0d4/attachment.htm>