Change in osmo-mgw[master]: mgcp_internal: LOGPENDP: ensure *endp is not NULL

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu May 2 17:17:30 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13849 )

Change subject: mgcp_internal: LOGPENDP: ensure *endp is not NULL
......................................................................

mgcp_internal: LOGPENDP: ensure *endp is not NULL

In certain cases the endp can be NULL. LOGPENDP will dereference the
pointer to retreive the endpoint number.

Fixes: 8a893442a1e9 ("mgcp_internal: LOGPENDP: ensure *endp is not NULL")
Change-Id: Ie9b5ecf08f69533ccb2fbd7fbbb529105e0c922f
---
M include/osmocom/mgcp/mgcp_internal.h
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, approved
  Harald Welte: Looks good to me, approved



diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h
index 24e28b4..82ff6c8 100644
--- a/include/osmocom/mgcp/mgcp_internal.h
+++ b/include/osmocom/mgcp/mgcp_internal.h
@@ -338,7 +338,7 @@
 
 #define LOGPENDP(endp, cat, level, fmt, args...) \
 LOGP(cat, level, "endpoint:0x%x " fmt, \
-     ENDPOINT_NUMBER(endp), \
+     endp ? ENDPOINT_NUMBER(endp) : -1, \
      ## args)
 
 #define LOGPCONN(conn, cat, level, fmt, args...) \

-- 
To view, visit https://gerrit.osmocom.org/13849
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9b5ecf08f69533ccb2fbd7fbbb529105e0c922f
Gerrit-Change-Number: 13849
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190502/a707fe9c/attachment.html>


More information about the gerrit-log mailing list