[vlc-commits] mkv: check for overflow and fix type limit warning
Rémi Denis-Courmont
git at videolan.org
Tue Apr 1 22:45:26 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Apr 1 23:32:45 2014 +0300| [93db7261953ba2cfe55028540c7ea28cd3edaa04] | committer: Rémi Denis-Courmont
mkv: check for overflow and fix type limit warning
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=93db7261953ba2cfe55028540c7ea28cd3edaa04
---
modules/demux/mkv/mkv.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index bb5711e..ef6a501 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -559,7 +559,7 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
// condition when the DTS is correct (keyframe or B frame == NOT P frame)
}
frame_size += data->Size();
- if( !data->Buffer() || data->Size() > SIZE_MAX || frame_size > block_size )
+ if( !data->Buffer() || data->Size() > frame_size || frame_size > block_size )
{
msg_Warn( p_demux, "Cannot read frame (too long or no frame)" );
break;
More information about the vlc-commits
mailing list