[vlc-commits] demux: asf: add packet values check.
Francois Cartegnie
git at videolan.org
Wed Nov 27 14:18:11 CET 2013
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Nov 27 14:17:24 2013 +0100| [98787d0843612271e99d62bee0dfd8197f0cf404] | committer: Francois Cartegnie
demux: asf: add packet values check.
div by zero in many places
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=98787d0843612271e99d62bee0dfd8197f0cf404
---
modules/demux/asf/libasf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/demux/asf/libasf.c b/modules/demux/asf/libasf.c
index c9070d5..6e19e47 100644
--- a/modules/demux/asf/libasf.c
+++ b/modules/demux/asf/libasf.c
@@ -319,8 +319,8 @@ static int ASF_ReadObject_file_properties( stream_t *s, asf_object_t *p_obj )
p_fp->i_send_duration = GetQWLE( p_peek + 72 );
p_fp->i_preroll = GetQWLE( p_peek + 80 );
p_fp->i_flags = GetDWLE( p_peek + 88 );
- p_fp->i_min_data_packet_size = GetDWLE( p_peek + 92 );
- p_fp->i_max_data_packet_size = GetDWLE( p_peek + 96 );
+ p_fp->i_min_data_packet_size = __MAX( GetDWLE( p_peek + 92 ), (uint32_t) 1 );
+ p_fp->i_max_data_packet_size = __MAX( GetDWLE( p_peek + 96 ), (uint32_t) 1 );
p_fp->i_max_bitrate = GetDWLE( p_peek + 100 );
#ifdef ASF_DEBUG
More information about the vlc-commits
mailing list