[FFmpeg-devel] [PATCH] lavfi/avcodec: add consistency checks in avfilter_copy_buf_props()

Stefano Sabatini stefasab at gmail.com
Wed Jun 13 10:59:13 CEST 2012


On date Sunday 2012-06-10 20:28:50 +0200, Michael Niedermayer encoded:
> On Sun, Jun 10, 2012 at 06:34:30PM +0200, Stefano Sabatini wrote:
> > Fix possible crash.
> > ---
> >  libavfilter/avcodec.c |    6 ++++++
> >  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> the dst==NULL case and src==dst==NULL should be ok
> 

> about dst!=NULL && src==NULL iam unsure, it would leave the destination
> in undefined state if the user app doesnt check the return value thus
> a immedeate crash may actually be better

Added an assert in that case.

I'm unsure about what to do with the type inconsistency cases (VIDEO
&& !ref->video), maybe should I add an assert as well there?
-- 
FFmpeg = Fantastic and Fabulous Martial Portentous Ecumenical Generator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavfi-avcodec-add-consistency-checks-in-avfilter_cop.patch
Type: text/x-diff
Size: 1711 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120613/e72beb36/attachment.bin>


More information about the ffmpeg-devel mailing list