[vlc-commits] asf: Fix potential null pointer dereference
Hugo Beauzée-Luyssen
git at videolan.org
Thu Jan 18 17:27:38 CET 2018
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Jan 18 12:42:16 2018 +0100| [f99b2d30f9d01459a0cf9418e63415c88255e550] | committer: Hugo Beauzée-Luyssen
asf: Fix potential null pointer dereference
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f99b2d30f9d01459a0cf9418e63415c88255e550
---
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 5a18b1cd35..d17fb5e2db 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -564,7 +564,7 @@ static void Packet_SetAR( asf_packet_sys_t *p_packetsys, uint8_t i_stream_number
demux_sys_t *p_sys = p_demux->p_sys;
asf_track_t *tk = 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