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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnodeb/+/26605 )
Change subject: gtp: Fix possible null pointer dereference
......................................................................
gtp: Fix possible null pointer dereference
Closes: Coverity CID#242771
Change-Id: I412082cc5fa93818d321210c34a2d22c038cb985
---
M src/osmo-hnodeb/gtp.c
1 file changed, 9 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/osmo-hnodeb/gtp.c b/src/osmo-hnodeb/gtp.c
index 22d4074..f7d9a14 100644
--- a/src/osmo-hnodeb/gtp.c
+++ b/src/osmo-hnodeb/gtp.c
@@ -79,12 +79,18 @@
struct hnb *hnb;
int rc;
- if (!conn || !conn->ue->conn_ps.active) {
- LOGUE(conn->ue, DGTP, LOGL_NOTICE, "Tx GTP-CONN_DATA.ind data=%p len=%u but UE conn_ps is not active!\n",
- packet, len);
+ if (!conn) {
+ LOGP(DGTP, LOGL_NOTICE, "Tx GTP-CONN_DATA.ind data=%p len=%u with no conn!\n",
+ packet, len);
return -EINVAL;
}
ue = conn->ue;
+
+ if (!ue->conn_ps.active) {
+ LOGUE(ue, DGTP, LOGL_NOTICE, "Tx GTP-CONN_DATA.ind data=%p len=%u but UE conn_ps is not active!\n",
+ packet, len);
+ return -EINVAL;
+ }
hnb = ue->hnb;
LOGUE(ue, DGTP, LOGL_DEBUG, "Tx GTP-CONN_DATA.ind data=%p len=%u\n", packet, len);
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnodeb/+/26605
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnodeb
Gerrit-Branch: master
Gerrit-Change-Id: I412082cc5fa93818d321210c34a2d22c038cb985
Gerrit-Change-Number: 26605
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211217/c4b47d8a/attachment.htm>