[vlc-commits] asf: Fix potential null pointer dereference
Hugo Beauzée-Luyssen
git at videolan.org
Fri Jan 19 16:15:40 CET 2018
vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Jan 18 12:42:16 2018 +0100| [72376ef02791bb1dd9028c7330b523bf5a12f643] | committer: Jean-Baptiste Kempf
asf: Fix potential null pointer dereference
(cherry picked from commit f99b2d30f9d01459a0cf9418e63415c88255e550)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=72376ef02791bb1dd9028c7330b523bf5a12f643
---
modules/demux/asf/asf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index 70a0a07f15..6038a49e97 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -562,7 +562,7 @@ static void Packet_SetAR( asf_packet_sys_t *p_packetsys, uint8_t i_stream_number
{
demux_t *p_demux = p_packetsys->p_demux;
asf_track_t *tk = p_demux->p_sys->track[i_stream_number];
- if ( tk->p_fmt->video.i_sar_num == i_ratio_x && tk->p_fmt->video.i_sar_den == i_ratio_y )
+ if ( !tk->p_fmt || (tk->p_fmt->video.i_sar_num == i_ratio_x && tk->p_fmt->video.i_sar_den == i_ratio_y ) )
return;
/* Only apply if origin pixel size >= 1x1, due to broken yacast */
More information about the vlc-commits
mailing list