Change in osmo-bts[master]: prevent potential NULL dereference in virtbts's tx_tchh_fn

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/.

Stefan Sperling gerrit-no-reply at lists.osmocom.org
Tue Nov 6 15:29:43 UTC 2018


Stefan Sperling has uploaded this change for review. ( https://gerrit.osmocom.org/11632


Change subject: prevent potential NULL dereference in virtbts's tx_tchh_fn
......................................................................

prevent potential NULL dereference in virtbts's tx_tchh_fn

If chan_state->ongoing_facch is set, this code's logic
suggests that both msg_facch and msg_tch could be NULL.
Don't dereference msg_tch unconditionally.

Change-Id: Icf5584396c5b925d55ca9380dd4f869ae5d72da3
Related: CID#172047
---
M src/osmo-bts-virtual/scheduler_virtbts.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/32/11632/1

diff --git a/src/osmo-bts-virtual/scheduler_virtbts.c b/src/osmo-bts-virtual/scheduler_virtbts.c
index 2248afc..25f6583 100644
--- a/src/osmo-bts-virtual/scheduler_virtbts.c
+++ b/src/osmo-bts-virtual/scheduler_virtbts.c
@@ -463,7 +463,7 @@
 	if (msg_facch) {
 		tx_to_virt_um(l1t, tn, fn, chan, msg_facch);
 		msgb_free(msg_tch);
-	} else
+	} else if (msg_tch)
 		tx_to_virt_um(l1t, tn, fn, chan, msg_tch);
 
 send_burst:

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf5584396c5b925d55ca9380dd4f869ae5d72da3
Gerrit-Change-Number: 11632
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181106/840bc7e3/attachment.htm>


More information about the gerrit-log mailing list