[MPlayer-cvslog] r35317 - trunk/libmpdemux/demux_mov.c

reimar subversion at mplayerhq.hu
Wed Oct 31 21:44:16 CET 2012


Author: reimar
Date: Wed Oct 31 21:44:16 2012
New Revision: 35317

Log:
Fix off-by-one error in range check.

Modified:
   trunk/libmpdemux/demux_mov.c

Modified: trunk/libmpdemux/demux_mov.c
==============================================================================
--- trunk/libmpdemux/demux_mov.c	Wed Oct 31 21:41:07 2012	(r35316)
+++ trunk/libmpdemux/demux_mov.c	Wed Oct 31 21:44:16 2012	(r35317)
@@ -1224,7 +1224,7 @@ static int gen_sh_video(sh_video_t* sh, 
 		      if (count_flag & 0x8000)
 		        entry = i;
 		      // only care about top 8 bits of 16-bit R, G, or B value
-		      if (entry <= palette_count && entry >= 0)
+		      if (entry < palette_count && entry >= 0)
 		      {
 		        palette_map[entry * 4 + 2] = trak->stdata[hdr_ptr + 0];
 		        palette_map[entry * 4 + 1] = trak->stdata[hdr_ptr + 2];


More information about the MPlayer-cvslog mailing list