On Thu, Feb 19, 2015 at 10:34:03PM +0200, Martin Storsjö wrote:
> The if statement just above checks the same, so there's no possibility
> that src_len ends up negative.

I agree about the if-statement, but it seems src_len can end up negative.
Here's a shortened version of the block:

    while (src_len > 2) {
        uint16_t nal_size = AV_RB16(src);
        src_len -= 2;
        src_len -= nal_size;
        if (src_len < 0)
            av_log(ctx, AV_LOG_ERROR,
                   "Consumed more bytes than we got! (%d)\n", src_len);

Looks like src_len can end up negative to me ...

Diego
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to