[FFmpeg-devel] [PATCH] Support limiting the number of pixels per image

Michael Niedermayer michael at niedermayer.cc
Fri Dec 9 21:51:57 EET 2016


On Fri, Dec 09, 2016 at 12:45:22AM +0100, Andreas Cadhalpun wrote:
> On 08.12.2016 19:30, Michael Niedermayer wrote:
> > TODO: split into 2 patches (one per lib), docs & bump
> > 
> > This allows preventing some OOM and "slow decoding" cases by limiting the maximum resolution
> > this may be useful to avoid fuzzers getting stuck in boring cases
> > 
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> >  libavcodec/avcodec.h                 |  8 ++++++++
> >  libavcodec/options_table.h           |  1 +
> >  libavutil/imgutils.c                 | 22 ++++++++++++++++++----
> >  tests/ref/fate/api-mjpeg-codec-param |  2 ++
> >  tests/ref/fate/api-png-codec-param   |  2 ++
> >  5 files changed, 31 insertions(+), 4 deletions(-)
> 
> That's probably OK.
> One caveat is that currently not every demuxer uses av_image_check_size,
> but I'm working on fixing that.

> Do you plan to reduce the default in a future patch?

Iam happy to leave that to others to do

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161209/f0b11f11/attachment.sig>


More information about the ffmpeg-devel mailing list