pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-gprs/+/33847 )
Change subject: rlcmac: Fix null ptr dereference
......................................................................
rlcmac: Fix null ptr dereference
Caught by ASan during test run. This can happen if
gprs_rlcmac_ul_tbf_schedule_next_llc_frame() finds no more llc frames to
submit during the loop iteration.
Change-Id: I5bd6dd6c6b7dc4b911af7bc119cf85eb810959a0
---
M src/rlcmac/tbf_ul.c
1 file changed, 14 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/47/33847/1
diff --git a/src/rlcmac/tbf_ul.c b/src/rlcmac/tbf_ul.c
index d9cd04a..0d78383 100644
--- a/src/rlcmac/tbf_ul.c
+++ b/src/rlcmac/tbf_ul.c
@@ -619,7 +619,7 @@
do {
int payload_written = 0;
- if (msgb_length(ul_tbf->llc_tx_msg) == 0) {
+ if (!ul_tbf->llc_tx_msg || msgb_length(ul_tbf->llc_tx_msg) == 0) {
/* The data just drained, store the current fn */
if (ul_tbf->last_ul_drained_fn < 0)
ul_tbf->last_ul_drained_fn = bi->fn;
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-gprs/+/33847
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I5bd6dd6c6b7dc4b911af7bc119cf85eb810959a0
Gerrit-Change-Number: 33847
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange