mpeg2: dvb mpeg2 crash [1/1]
authormiaohong chen <miaohong.chen@amlogic.com>
Thu, 30 Apr 2020 10:58:50 +0000 (18:58 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Mon, 11 May 2020 06:33:01 +0000 (23:33 -0700)
PD#SWPL-25177

Problem:
VMX encrypted stream switch to "BBC MUX uh-ts"
and crash in dvb

Solution:
Non-null judgment on null pointer

Verify:
U215

Change-Id: I638acd8e94fad5ff1f51263c856115af03e4938c
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
drivers/frame_provider/decoder/mpeg12/vmpeg12_multi.c

index 9b46df119ba46b02f460f1f46e1c45e781fbbd6f..27d62a978c19b7e2bdf038952288f56ab2bece15 100644 (file)
@@ -1455,7 +1455,7 @@ static void userdata_push_do_work(struct work_struct *work)
        psrc_data = (u8 *)hw->ccbuf_phyAddress_virt + hw->ucode_cc_last_wp;
 
        pdata = hw->userdata_info.data_buf + hw->userdata_info.last_wp;
-       for (i = 0; i < data_length && psrc_data; i++) {
+       for (i = 0; i < data_length && hw->ccbuf_phyAddress_virt != NULL && psrc_data; i++) {
                *pdata++ = *psrc_data++;
                if (pdata >= hw->userdata_info.data_buf_end)
                        pdata = hw->userdata_info.data_buf;