[vlc-commits] smf: fix division by zero
Rémi Denis-Courmont
git at videolan.org
Fri Oct 28 16:59:51 CEST 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Oct 28 17:59:38 2016 +0300| [edc9d41049db000d9a3d4c6453037b6e0b3cab1d] | committer: Rémi Denis-Courmont
smf: fix division by zero
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=edc9d41049db000d9a3d4c6453037b6e0b3cab1d
---
modules/demux/smf.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/demux/smf.c b/modules/demux/smf.c
index 77e0a5e..009084f 100644
--- a/modules/demux/smf.c
+++ b/modules/demux/smf.c
@@ -617,6 +617,11 @@ static int Open (vlc_object_t *obj)
}
else
{
+ if (ppqn == 0)
+ {
+ msg_Err(demux, "invalid SMF file PPQN: %u", ppqn);
+ return VLC_EGENERIC;
+ }
msg_Dbg (demux, " %u pulses per quarter note", ppqn);
}
More information about the vlc-commits
mailing list