From: apollo.ling Date: Thu, 24 Dec 2020 12:15:19 +0000 (+0800) Subject: vdec: check the pointer before using it [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f4ee88db4efb17a46abcfda29d0a11b156d104e7;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_media.git vdec: check the pointer before using it [1/1] PD#SWPL-38329 Problem: play special stream,DUT reboot when stream replay Solution: Check the pointer before using it Verify: ah212 Change-Id: I53a1e2643f00513cae307aa61ed90f32c71bba65 Signed-off-by: apollo.ling --- diff --git a/drivers/frame_provider/decoder/h264_multi/h264_dpb.c b/drivers/frame_provider/decoder/h264_multi/h264_dpb.c index 874b5f3..523ce9f 100644 --- a/drivers/frame_provider/decoder/h264_multi/h264_dpb.c +++ b/drivers/frame_provider/decoder/h264_multi/h264_dpb.c @@ -5313,9 +5313,10 @@ static void reorder_lists(struct Slice *currSlice) PRINT_FLAG_DPB_DETAIL, "listX[1] reorder (PicNum): "); for (i = 0; i < currSlice->listXsize[1]; i++) { - dpb_print_cont(p_H264_Dpb->decoder_index, - PRINT_FLAG_DPB_DETAIL, "%d ", - currSlice->listX[1][i]->pic_num); + if (currSlice->listX[1][i]) + dpb_print_cont(p_H264_Dpb->decoder_index, + PRINT_FLAG_DPB_DETAIL, "%d ", + currSlice->listX[1][i]->pic_num); } dpb_print_cont(p_H264_Dpb->decoder_index, PRINT_FLAG_DPB_DETAIL, "\n");