[FFmpeg-devel] [PATCH 3/6] Make sure neither data_size nor sample_count is negative

Michael Niedermayer michaelni at gmx.at
Tue May 17 22:28:01 CEST 2011


On Tue, Mar 08, 2011 at 01:18:28PM +0100, Tomas Härdin wrote:
> Ronald S. Bultje skrev 2011-03-07 18:18:
>> Hi,
>>
>> On Fri, Mar 4, 2011 at 3:21 AM, Tomas Härdin<tomas.hardin at codemill.se>  wrote:
>>> diff --git a/libavformat/wav.c b/libavformat/wav.c
>> [..]
>>> +        if (data_size<  0 || sample_count<  0) {
>>> +            av_log(s, AV_LOG_ERROR, "data_size = %li, sample_count = %li\n",
>>> +                   data_size, sample_count);
>>> +            return AVERROR_INVALIDDATA;
>>> +        }
>>
>> That's about the worst error message I've ever seen. :-D. Could you
>> change that into something nicer?
>
> Sure, see attached patch.
>
> /Tomas

>  wav.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 4b342a27896184514752b1062ecb814a31385fee  0003-Make-sure-neither-data_size-nor-sample_count-is-nega.patch
> From b5f42c1bf10a74d226b078bfe5f2c1d0855b958a Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <tomas.hardin at codemill.se>
> Date: Thu, 3 Mar 2011 15:52:32 +0100
> Subject: [PATCH 3/6] Make sure neither data_size nor sample_count is negative

applied

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

There will always be a question for which you do not know the correct awnser.
-------------- 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/20110517/949839cb/attachment.asc>


More information about the ffmpeg-devel mailing list