pespin submitted this change.
osmux: Fix null ptr dereference sending UL data before the remote is configured
Related: SYS#6161
Change-Id: I5d7971c0ed9b22d35d8965af54031a43c6388762
---
M src/common/osmux.c
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/common/osmux.c b/src/common/osmux.c
index 3f137e5..83730ce 100644
--- a/src/common/osmux.c
+++ b/src/common/osmux.c
@@ -493,6 +493,12 @@
rtph = (struct rtp_hdr *)msgb_data(msg);
rtph->marker = marker;
+ /* Avoid using the osmux.in if not yet connected. */
+ if (!lchan_osmux_connected(lchan)) {
+ msgb_free(msg);
+ return -1;
+ }
+
while ((rc = osmux_xfrm_input(lchan->abis_ip.osmux.in, msg,
lchan->abis_ip.osmux.remote_cid)) > 0) {
/* batch full, build and deliver it */
To view, visit change 29908. To unsubscribe, or for help writing mail filters, visit settings.