[MPlayer-cvslog] r30972 - trunk/libmpcodecs/vd_raw.c

reimar subversion at mplayerhq.hu
Sun Mar 28 01:08:28 CET 2010


Author: reimar
Date: Sun Mar 28 01:08:28 2010
New Revision: 30972

Log:
Fix crash with incomplete yuv2 frames.

Modified:
   trunk/libmpcodecs/vd_raw.c

Modified: trunk/libmpcodecs/vd_raw.c
==============================================================================
--- trunk/libmpcodecs/vd_raw.c	Sat Mar 27 20:45:59 2010	(r30971)
+++ trunk/libmpcodecs/vd_raw.c	Sun Mar 28 01:08:28 2010	(r30972)
@@ -124,7 +124,7 @@ static mp_image_t* decode(sh_video_t *sh
 #endif
 	}
 	frame_size=mpi->stride[0]*mpi->h;
-	if (format == MKTAG('y', 'u', 'v', '2')) {
+	if (len >= frame_size && format == MKTAG('y', 'u', 'v', '2')) {
 	  int i;
 	  for (i = 1; i < frame_size; i += 2)
 	    mpi->planes[0][i] ^= 128;


More information about the MPlayer-cvslog mailing list