vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <[email protected]> | Wed Sep 24 21:52:16 2014 +0300| [f54f04d0971b074c846e5416afa7a407073f6239] | committer: Rémi Denis-Courmont
demux: check stream_Read() (probably fixes #12276) stream_Read() can always fail. (cherry picked from commit ddcf5d1ce2904f2975d0b7f7b236454fd7bc41f5) > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=f54f04d0971b074c846e5416afa7a407073f6239 --- src/input/demux.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/input/demux.c b/src/input/demux.c index e887b3f..a0095ab 100644 --- a/src/input/demux.c +++ b/src/input/demux.c @@ -398,7 +398,8 @@ static bool SkipID3Tag( demux_t *p_demux ) i_size += 10; /* Skip the entire tag */ - stream_Read( p_demux->s, NULL, i_size ); + if( stream_Read( p_demux->s, NULL, i_size ) < i_size ) + return false; msg_Dbg( p_demux, "ID3v2.%d revision %d tag found, skipping %d bytes", version, revision, i_size ); @@ -429,7 +430,8 @@ static bool SkipAPETag( demux_t *p_demux ) i_size = GetDWLE( &p_peek[8+4] ) + ( (flags&(1<<30)) ? 32 : 0 ); /* Skip the entire tag */ - stream_Read( p_demux->s, NULL, i_size ); + if( stream_Read( p_demux->s, NULL, i_size ) < i_size ) + return false; msg_Dbg( p_demux, "AP2 v%d tag found, skipping %d bytes", i_version/1000, i_size ); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
