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

Tomas Härdin tomas.hardin
Tue Mar 8 13:18:28 CET 2011


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



More information about the ffmpeg-devel mailing list