Commit 9ed6cbc3 authored by Ronald S. Bultje's avatar Ronald S. Bultje
Browse files

ogg: fix double free when finding length of small chained oggs.

ogg_save() copies streams[], but doesn't keep track of free()'ed
struct members. Thus, if in between a call to ogg_save() and
ogg_restore(), streams[].private was free()'ed, this would result
in a double free -> crash, which happened when e.g. playing small
chained ogg fragments.
parent ef1ee362
......@@ -238,7 +238,8 @@ static int ogg_read_page(AVFormatContext *s, int *str)
for (n = 0; n < ogg->nstreams; n++) {
if (!ogg->state || ogg->state->streams[n].private != ogg->streams[n].private)
ogg->curidx = -1;
ogg->nstreams = 0;
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