[vlc-commits] demux: adaptive: fix potential use after free on oom
Francois Cartegnie
git at videolan.org
Thu May 16 17:12:36 CEST 2019
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu May 16 16:14:49 2019 +0200| [5d7bc4dbcb27cc74beb43c8eb0a2cf6369cdc4d7] | committer: Francois Cartegnie
demux: adaptive: fix potential use after free on oom
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5d7bc4dbcb27cc74beb43c8eb0a2cf6369cdc4d7
---
modules/demux/adaptive/plumbing/FakeESOut.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/modules/demux/adaptive/plumbing/FakeESOut.cpp b/modules/demux/adaptive/plumbing/FakeESOut.cpp
index 4b2409cabf..42d46f3c34 100644
--- a/modules/demux/adaptive/plumbing/FakeESOut.cpp
+++ b/modules/demux/adaptive/plumbing/FakeESOut.cpp
@@ -137,8 +137,6 @@ FakeESOutID * FakeESOut::createNewID( const es_format_t *p_fmt )
extrainfo->fillExtraFMTInfo( &fmtcopy );
FakeESOutID *es_id = new (std::nothrow) FakeESOutID( this, &fmtcopy );
- if(likely(es_id))
- fakeesidlist.push_back( es_id );
es_format_Clean( &fmtcopy );
@@ -324,6 +322,7 @@ es_out_id_t * FakeESOut::esOutAdd_Callback(es_out_t *fakees, const es_format_t *
AbstractCommand *command = me->commandsqueue->factory()->createEsOutAddCommand( es_id );
if( likely(command) )
{
+ me->fakeesidlist.push_back(es_id);
me->commandsqueue->Schedule( command );
return reinterpret_cast<es_out_id_t *>(es_id);
}
More information about the vlc-commits
mailing list