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

Ronald S. Bultje rsbultje
Mon Mar 7 18:18:45 CET 2011


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?

Ronald



More information about the ffmpeg-devel mailing list