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
This commit is contained in:
parent
697e259dc4
commit
ca183f79d8
|
@ -57,6 +57,10 @@ static int pq_queue_tch_fb_recv(void *_state, uint8_t *out,
|
|||
|
||||
/* 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);
|
||||
|
|
Loading…
Reference in New Issue