[vlc-commits] mjpeg: handle I/O errors

Rémi Denis-Courmont git at videolan.org
Fri Jul 7 22:57:58 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jul  7 23:50:09 2017 +0300| [a0e6405af4f480a7d3c0a51588a948370996e665] | committer: Rémi Denis-Courmont

mjpeg: handle I/O errors

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a0e6405af4f480a7d3c0a51588a948370996e665
---

 modules/demux/mjpeg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mjpeg.c b/modules/demux/mjpeg.c
index d688a9b46a..a66f3871f5 100644
--- a/modules/demux/mjpeg.c
+++ b/modules/demux/mjpeg.c
@@ -344,7 +344,8 @@ static int Open( vlc_object_t * p_this )
     if( b_matched )
     {
         p_demux->pf_demux = MimeDemux;
-        vlc_stream_Read( p_demux->s, NULL, i_size );
+        if( vlc_stream_Read( p_demux->s, NULL, i_size ) < i_size )
+            goto error;
     }
     else if( i_size == 0 )
     {



More information about the vlc-commits mailing list