[vlc-commits] demux: avi: fix write/read overflow
Francois Cartegnie
git at videolan.org
Thu Nov 16 12:04:24 CET 2017
vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Nov 16 12:00:10 2017 +0100| [01d6e8325a9a84871613590e79fc9d03e361a2ba] | committer: Francois Cartegnie
demux: avi: fix write/read overflow
f571d59273b881dfd8cd69b5ff6913b566e26fb8 backport
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=01d6e8325a9a84871613590e79fc9d03e361a2ba
---
modules/demux/avi/avi.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index d60d7b693a..76b55d0aca 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -867,6 +867,11 @@ block_t * ReadFrame( demux_t *p_demux, const avi_track_t *tk,
/* skip header */
if( tk->i_idxposb == 0 )
{
+ if( i_header >= p_frame->i_buffer )
+ {
+ p_frame->i_buffer = 0;
+ return p_frame;
+ }
p_frame->p_buffer += i_header;
p_frame->i_buffer -= i_header;
}
More information about the vlc-commits
mailing list