[FFmpeg-devel] [PATCH] Floating point exception
Sat Dec 25 16:30:52 CET 2010
On 25 dec 2010, at 07:00, David Czech <davidczech510 at gmail.com> wrote:
> While fuzzing, I have found another crash for Google Code-In, this time a
> divide-by-zero in ffmpeg, issue here: http://roundup.ffmpeg.org/issue2443. I
> have a patch, it check that ist->st->codec->time_base.den is not zero before
> dividing with it. I have uploaded a sample crash test in upload.ffmpeg.org,
> under "fpe-bug/". Crashes latest svn and Ubuntu's packaged ffmpeg.
> Any comment, suggestions?
Yes, this is the wrong place, .den == 0 is an invalid value and a bug in whatever sets it to that.
Changing the code in ffmpeg.c means that other programs like MPlayer will have to add the same hack and/or will still crash.
It is unreasonable to expect users of libav* to check every single value the library returns, that would mean 100s of lines of code even before the code does anything.
More information about the ffmpeg-devel