]> git.sesse.net Git - vlc/commitdiff
android_window: check subtitles bounds
authorThomas Guillem <thomas@gllm.fr>
Mon, 29 Dec 2014 16:45:12 +0000 (16:45 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 29 Dec 2014 21:27:30 +0000 (22:27 +0100)
(fixes #13350)

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/video_output/android/android_window.c

index e584a54de8a490d578b56fdb023e081fb4e2bc9d..7a556648ca4d9238d1f5d1a1b09c98507a541c7f 100644 (file)
@@ -878,8 +878,15 @@ static void SubtitleGetDirtyBounds(vout_display_t *vd,
         }
     }
 
-    /* default is full picture */
-    if (!b_found) {
+    if (!b_found
+     || p_out_bounds->left < 0
+     || p_out_bounds->right < 0
+     || (unsigned int) p_out_bounds->right > sys->p_sub_pic->format.i_width
+     || p_out_bounds->bottom < 0
+     || p_out_bounds->top < 0
+     || (unsigned int) p_out_bounds->top > sys->p_sub_pic->format.i_height)
+    {
+        /* default is full picture */
         p_out_bounds->left = 0;
         p_out_bounds->top = 0;
         p_out_bounds->right = sys->p_sub_pic->format.i_width;