[FFmpeg-devel] [PATCH 2/3] avformat/tty: Fix division by 0 in probe

Hendrik Leppkes h.leppkes at gmail.com
Fri Feb 7 01:19:32 EET 2020


On Fri, Feb 7, 2020 at 12:16 AM Michael Niedermayer <michaelni at gmx.at> wrote:
>
> On Thu, Feb 06, 2020 at 03:27:11PM +0100, Paul B Mahol wrote:
> > Nonsense, why would this code be called with 0 buffer?
>
> I guess because code calls av_probe_input_format3() with a 0 buffer
> its a public function and called by multiple places from our code base
> as well. Theres even code in it to handle the case of a 0 sized input.
>
> The code that triggers it in this case seems to be probing the stream
> content. Its not a 0 byte input file
>

The generic code in the public API calls should probably catch that
then, a probe function really can't do anything meaningful on a NULL
or zero-sized buffer.

- Hendrik


More information about the ffmpeg-devel mailing list