[vlc-commits] demux: ogg: divide by zero fix (cid #1048729)
Francois Cartegnie
git at videolan.org
Wed Nov 27 19:50:29 CET 2013
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Nov 27 17:41:20 2013 +0100| [3f96c0ac74b442b9f8b97d98ca13649c2c9786a6] | committer: Francois Cartegnie
demux: ogg: divide by zero fix (cid #1048729)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3f96c0ac74b442b9f8b97d98ca13649c2c9786a6
---
modules/demux/ogg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index a901c69..2c43c39 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -2183,7 +2183,7 @@ static void Ogg_ReadTheoraHeader( logical_stream_t *p_stream,
bs_read( &bitstream, 8 ); /* y offset */
i_fps_numerator = bs_read( &bitstream, 32 );
- i_fps_denominator = bs_read( &bitstream, 32 );
+ i_fps_denominator = __MAX( bs_read( &bitstream, 32 ), (uint32_t) 1 );
bs_read( &bitstream, 24 ); /* aspect_numerator */
bs_read( &bitstream, 24 ); /* aspect_denominator */
More information about the vlc-commits
mailing list