Commit 2f13bac4 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: ogg: fix unwanted heap reading (cid #1048649, cid #1048884)

Something clearly wrong with that code, as pointed by coverity.
Due to lack of samples using the old audio format 57 bytes
is a guess regarding the previous boundary check.
parent 3f96c0ac
......@@ -1680,7 +1680,7 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
p_stream->fmt.i_extra = i_extra_size;
p_stream->fmt.p_extra = malloc( p_stream->fmt.i_extra );
if( p_stream->fmt.p_extra )
memcpy( p_stream->fmt.p_extra, st + 1,
memcpy( p_stream->fmt.p_extra, oggpacket.packet + 57,
p_stream->fmt.i_extra );
else
p_stream->fmt.i_extra = 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