[vlc-commits] packetizer: dts: reject invalid parameters (fix #18000)
Francois Cartegnie
git at videolan.org
Fri Feb 10 13:54:51 CET 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Feb 10 13:54:16 2017 +0100| [da80e5b3d6dd2e64b324a316e02450b3f6cc4217] | committer: Francois Cartegnie
packetizer: dts: reject invalid parameters (fix #18000)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=da80e5b3d6dd2e64b324a316e02450b3f6cc4217
---
modules/packetizer/dts_header.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/packetizer/dts_header.c b/modules/packetizer/dts_header.c
index a456902..04cf25e 100644
--- a/modules/packetizer/dts_header.c
+++ b/modules/packetizer/dts_header.c
@@ -288,6 +288,10 @@ static int dts_header_ParseCore( vlc_dts_header_t *p_header,
p_header->i_frame_length = (i_nblks + 1) * 32;
p_header->i_original_channels = dca_get_channels( i_amode, b_lfe );
+ if( !p_header->i_rate || !p_header->i_frame_size ||
+ !p_header->i_frame_length || !p_header->i_original_channels )
+ return VLC_EGENERIC;
+
return VLC_SUCCESS;
}
More information about the vlc-commits
mailing list