AVCodec *av_codec_next(const AVCodec *c)
{
    if (c)
        return c->next;
    else
        return first_avcodec;
}

The product writes data past the end, or before the beginning, of the intended buffer.