[vlc-commits] packetizer: flac: fix divbyzero (cid #1151677)

Francois Cartegnie git at videolan.org
Thu Apr 17 14:11:37 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Apr 17 13:55:13 2014 +0200| [a4fdb5fa17c6d34494ceb48982d0aa1d94c8da63] | committer: Francois Cartegnie

packetizer: flac: fix divbyzero (cid #1151677)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a4fdb5fa17c6d34494ceb48982d0aa1d94c8da63
---

 modules/packetizer/flac.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/packetizer/flac.c b/modules/packetizer/flac.c
index 5e8a582..d3fe322 100644
--- a/modules/packetizer/flac.c
+++ b/modules/packetizer/flac.c
@@ -468,6 +468,9 @@ static int SyncInfo(decoder_t *p_dec, uint8_t *p_buf,
             samplerate *= 10;
     }
 
+    if ( !samplerate )
+        return 0;
+
     /* Check the CRC-8 byte */
     if (flac_crc8(p_buf, i_header) != p_buf[i_header])
         return 0;



More information about the vlc-commits mailing list