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

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Nov 18 20:20:23 UTC 2018


Harald Welte has submitted this change and it was merged. ( 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(-)

Approvals:
  Jenkins Builder: Verified
  Neels Hofmeyr: Looks good to me, approved



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: merged
Gerrit-Change-Id: Icf5584396c5b925d55ca9380dd4f869ae5d72da3
Gerrit-Change-Number: 11632
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-CC: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181118/7a5bc8e3/attachment.htm>


More information about the gerrit-log mailing list