diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index 2739123389..3f0797bc22 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -347,7 +347,7 @@ static int vorbis_header(AVFormatContext *s, int idx) avpriv_set_pts_info(st, 64, 1, srate); } } else if (os->buf[os->pstart] == 3) { - if (vorbis_update_metadata(s, idx) >= 0) { + if (vorbis_update_metadata(s, idx) >= 0 && priv->len[1] > 10) { // drop all metadata we parsed and which is not required by libvorbis unsigned new_len = 7 + 4 + AV_RL32(priv->packet[1] + 7) + 4 + 1; if (new_len >= 16 && new_len < os->psize) {