[FFmpeg-devel] [PATCH] lavf: Add an XMV demuxer

Michael Niedermayer michaelni at gmx.at
Fri Aug 19 00:08:15 CEST 2011


Hi Sven

On Thu, Aug 18, 2011 at 07:32:35PM +0200, Sven Hesse wrote:
[...]
>  xmv.c |    9 +++++++++
>  1 file changed, 9 insertions(+)
> 9481eaca8c16fda06247f1c28086b3ca33437475  0005-xmv-Add-some-sanity-checks.patch
> From eafe9efc574bcd71c7e487239d51ef9f2a71dab8 Mon Sep 17 00:00:00 2001
> From: Sven Hesse <drmccoy at drmccoy.de>
> Date: Thu, 18 Aug 2011 19:16:27 +0200
> Subject: [PATCH 5/6] xmv: Add some sanity checks
> 
> ---
>  libavformat/xmv.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/libavformat/xmv.c b/libavformat/xmv.c
> index 62c7e26..5c64e78 100644
> --- a/libavformat/xmv.c
> +++ b/libavformat/xmv.c
> @@ -183,6 +183,10 @@ static int xmv_read_header(AVFormatContext *s,
>          packet->bits_per_sample = avio_rl16(pb);
>          packet->flags           = avio_rl16(pb);
>  
> +        assert(packet->channels > 0);
> +        assert(packet->sample_rate > 0);
> +        assert(packet->bits_per_sample > 0);

Checking via assert is not so good because a crafted file can then
cause the user application to fail with assert failure

other patches applied
thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110819/fcc3cc55/attachment.asc>


More information about the ffmpeg-devel mailing list