[MPlayer-cvslog] r35314 - trunk/sub/sub.c

reimar subversion at mplayerhq.hu
Wed Oct 31 21:11:49 CET 2012


Author: reimar
Date: Wed Oct 31 21:11:49 2012
New Revision: 35314

Log:
Fix potential out-of-bounds write due to breaking
out only of the inner loop when reaching the limit.

Modified:
   trunk/sub/sub.c

Modified: trunk/sub/sub.c
==============================================================================
--- trunk/sub/sub.c	Wed Oct 31 21:05:31 2012	(r35313)
+++ trunk/sub/sub.c	Wed Oct 31 21:11:49 2012	(r35314)
@@ -942,6 +942,8 @@ static inline void vo_update_text_sub(mp
 		    obj->params.subtitle.utbl[utblc++] = c;
 		    k++;
 		}
+		if (utblc > MAX_UCS)
+		    break;
 		obj->params.subtitle.utbl[utblc++] = ' ';
 	    }
 	    obj->params.subtitle.utbl[utblc - 1] = 0;


More information about the MPlayer-cvslog mailing list