Fixes: memleak Fixes: 19949/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5743636058210304
Showing the changes to libavformat (1 of 1 file). Show all
Unified · Split
| @@ -385,7 +385,12 @@ static int vorbis_header(AVFormatContext *s, int idx) · 384 unmodified lines | ||
| 385 | 385 | } |
| 386 | 386 | } |
| 387 | 387 | } else { |
| 388 | − int ret = fixup_vorbis_headers(s, priv, &st->codecpar->extradata); | |
| 388 | + int ret; | |
| 389 | + | |
| 390 | + if (priv->vp) | |
| 391 | + return AVERROR_INVALIDDATA; | |
| 392 | + | |
| 393 | + ret = fixup_vorbis_headers(s, priv, &st->codecpar->extradata); | |
| 389 | 394 | if (ret < 0) { |
| 390 | 395 | st->codecpar->extradata_size = 0; |
| 391 | 396 | return ret; |