[vlc-commits] rawvid: fix error handling
Rémi Denis-Courmont
git at videolan.org
Mon Jul 7 18:09:44 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jul 7 19:02:31 2014 +0300| [4a37004bd7b6e851cc7a75c3d40692298d7a6f11] | committer: Rémi Denis-Courmont
rawvid: fix error handling
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4a37004bd7b6e851cc7a75c3d40692298d7a6f11
---
modules/demux/rawvid.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/demux/rawvid.c b/modules/demux/rawvid.c
index f98bafc..239f1ca 100644
--- a/modules/demux/rawvid.c
+++ b/modules/demux/rawvid.c
@@ -190,13 +190,14 @@ valid:
/* override presets if yuv4mpeg2 */
if( b_y4m )
{
+ /* The string should start with "YUV4MPEG2" */
char *psz = stream_ReadLine( p_demux->s );
char *psz_buf;
int a = 1;
int b = 1;
- /* The string will start with "YUV4MPEG2" */
- assert( strlen(psz) >= 9 );
+ if( unlikely(psz == NULL) )
+ goto error;
/* NB, it is not possible to handle interlaced here, since the
* interlaced picture flags are in picture_t not block_t */
More information about the vlc-commits
mailing list