Commit 71407614 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/oggparsecelt: Do not re-allocate os->private

Fixes: double free
Fixes: clusterfuzz-testcase-minimized-5080550145785856

Found-by: ClusterFuzz
Reviewed-by: 's avatarNicolas George <george@nsup.org>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent a776cb20
......@@ -65,9 +65,14 @@ static int celt_header(AVFormatContext *s, int idx)
st->codecpar->channels = nb_channels;
if (sample_rate)
avpriv_set_pts_info(st, 64, 1, sample_rate);
priv->extra_headers_left = 1 + extra_headers;
av_free(os->private);
if (os->private) {
av_free(priv);
priv = os->private;
}
os->private = priv;
priv->extra_headers_left = 1 + extra_headers;
AV_WL32(st->codecpar->extradata + 0, overlap);
AV_WL32(st->codecpar->extradata + 4, version);
return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment