[FFmpeg-devel] [PATCH] swscale crash fix from Debian

Michael Niedermayer michaelni
Wed May 28 20:42:10 CEST 2008

On Wed, May 28, 2008 at 07:18:48PM +0200, Diego Biurrun wrote:
> Here is a patch from the Debian patchset for FFmpeg across which I just
> stumbled.  I have no further details apart from what is in the patch,
> but since it is so small I suppose it should be easy to review.
> Diego

> if sws_scale is given an invalid context (e.g. a null pointer), the
> function will crash because of a null pointer dereference. Add a check
> for that here.

Well if i give it a (void*)1 it will still crash. Should we check for that
as well?
I think feeding NULL instead of a context into swscale really makes no
sense at all. Its not as if swscale could do anything short of saying
"your code is buggy". The segfaul does that nicely already.

This patch smells like one of these
"it crashed here so i added a check here" patches

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080528/2a5aa5a8/attachment.pgp>

More information about the ffmpeg-devel mailing list