fixeria has uploaded this change for review.
mobile: fix segfault on empty TRAFFIC.ind
The L1 PHY may emit empty TRAFFIC.ind in case of decoding errors.
Abort execution of pq_audio_sink early, otherwise we hit an assert.
Change-Id: Ice11b72ddfd51fbfb17a4c609c664b86a8f69591
---
M src/host/layer23/src/mobile/gapk_io.c
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/07/35507/1
diff --git a/src/host/layer23/src/mobile/gapk_io.c b/src/host/layer23/src/mobile/gapk_io.c
index 966d0f4..d6b84a5 100644
--- a/src/host/layer23/src/mobile/gapk_io.c
+++ b/src/host/layer23/src/mobile/gapk_io.c
@@ -57,6 +57,10 @@
/* Calculate received frame length */
frame_len = msgb_l3len(tch_msg);
+ if (frame_len == 0) {
+ msgb_free(tch_msg);
+ return -EIO;
+ }
/* Copy the frame bytes from message */
memcpy(out, tch_msg->l3h, frame_len);
To view, visit change 35507. To unsubscribe, or for help writing mail filters, visit settings.