[FFmpeg-devel] [PATCH] check for mod by zero (issue 2502)

Daniel Kang daniel.d.kang
Sat Jan 8 05:33:17 CET 2011


On Fri, Jan 7, 2011 at 3:06 PM, Justin Ruggles <justin.ruggles at gmail.com>wrote:

>  In voc_get_packet(), if codec_id is invalid, don't read the packet.
> or alternatively, set it only once for the first valid value, then later
> instead of changing it if the value changes just print a warning and
> read the packet.
>
> In pcm.c if codec_id is invalid, don't try to decode the packet. It will
> screw up more than just the divide-by-zero.
>

I have added a check in voc_get_packet() along with a check in the pcm
decoder. I have kept the check for mod by zero.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcm_sanity_check.diff
Type: application/octet-stream
Size: 3179 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110107/593da21c/attachment.obj>



More information about the ffmpeg-devel mailing list