[MPlayer-cvslog] r37728 - trunk/libmpdemux/demux_mf.c
reimar
subversion at mplayerhq.hu
Sun Feb 14 15:12:54 CET 2016
Author: reimar
Date: Sun Feb 14 15:12:53 2016
New Revision: 37728
Log:
demux_mf: check fread number of bytes read.
On a short read we should rather fail than
passing uninitialized data.
Modified:
trunk/libmpdemux/demux_mf.c
Modified: trunk/libmpdemux/demux_mf.c
==============================================================================
--- trunk/libmpdemux/demux_mf.c Sun Feb 14 15:09:26 2016 (r37727)
+++ trunk/libmpdemux/demux_mf.c Sun Feb 14 15:12:53 2016 (r37728)
@@ -63,7 +63,7 @@ static int demux_mf_fill_buffer(demuxer_
{
sh_video_t * sh_video = demuxer->video->sh;
demux_packet_t * dp = new_demux_packet( fs.st_size );
- if ( !fread( dp->buffer,fs.st_size,1,f ) ) {
+ if ( fread( dp->buffer,1,fs.st_size,f ) != fs.st_size ) {
fclose(f);
free_demux_packet(dp);
return 0;
More information about the MPlayer-cvslog
mailing list