[vlc-commits] packetizer: hevc: fix potential null deref on recovery point

Francois Cartegnie git at videolan.org
Wed Apr 15 17:56:13 CEST 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Apr 15 13:42:37 2020 +0200| [d9f6202f3bf04be33d613e7ca5f5779d9928c7ff] | committer: Francois Cartegnie

packetizer: hevc: fix potential null deref on recovery point

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d9f6202f3bf04be33d613e7ca5f5779d9928c7ff
---

 modules/packetizer/hevc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/packetizer/hevc.c b/modules/packetizer/hevc.c
index a26c45a964..b9f7473fa8 100644
--- a/modules/packetizer/hevc.c
+++ b/modules/packetizer/hevc.c
@@ -151,7 +151,9 @@ static block_t * OutputQueues(decoder_sys_t *p_sys, bool b_valid)
                 p_au->p_next = NULL;
                 block_ChainLastAppend(&pp_output_last, p_au);
             }
-            block_ChainLastAppend(&pp_output_last, GetXPSCopy(p_sys));
+            block_t *p_xps = GetXPSCopy(p_sys);
+            if(p_xps)
+                block_ChainLastAppend(&pp_output_last, p_xps);
         }
         if(p_sys->pre.p_chain)
             block_ChainLastAppend(&pp_output_last, p_sys->pre.p_chain);



More information about the vlc-commits mailing list