# HG changeset patch # User faust3 # Date 1119798938 0 # Node ID cce2717344f4c64a619a5665181a8cec94acb95b # Parent 5aa87072ef31754db9d23c6c8b0b59c6de67155b 10l diff -r 5aa87072ef31 -r cce2717344f4 libmpdemux/demux_nuv.c --- a/libmpdemux/demux_nuv.c Sat Jun 25 18:33:44 2005 +0000 +++ b/libmpdemux/demux_nuv.c Sun Jun 26 15:15:38 2005 +0000 @@ -301,7 +301,8 @@ mp_msg ( MSGT_DEMUX, MSGL_V, "Checking for NuppelVideo\n" ); - stream_read(demuxer->stream,(char*)&ns,sizeof(ns)); + if(stream_read(demuxer->stream,(char*)&ns,sizeof(ns)) != sizeof(ns)) + return 0; if ( strncmp ( ns.finfo, "NuppelVideo", 12 ) ) return 0; /* Not a NuppelVideo file */ diff -r 5aa87072ef31 -r cce2717344f4 libmpdemux/demux_y4m.c --- a/libmpdemux/demux_y4m.c Sat Jun 25 18:33:44 2005 +0000 +++ b/libmpdemux/demux_y4m.c Sun Jun 26 15:15:38 2005 +0000 @@ -30,7 +30,9 @@ mp_msg(MSGT_DEMUX, MSGL_V, "Checking for YUV4MPEG2\n"); - stream_read(demuxer->stream, buf, 9); + if(stream_read(demuxer->stream, buf, 9)!=9) + return 0; + buf[9] = 0; if (strncmp("YUV4MPEG2", buf, 9) && strncmp("YUV4MPEG ", buf, 9)) {