[vlc-commits] android_window: check subtitles bounds

Thomas Guillem git at videolan.org
Mon Dec 29 22:28:00 CET 2014


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Dec 29 16:45:12 2014 +0000| [e5d6c04c14ccbd152458f6611e176dbb3945a956] | committer: Jean-Baptiste Kempf

android_window: check subtitles bounds

(fixes #13350)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e5d6c04c14ccbd152458f6611e176dbb3945a956
---

 modules/video_output/android/android_window.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/android/android_window.c b/modules/video_output/android/android_window.c
index e584a54..7a55664 100644
--- a/modules/video_output/android/android_window.c
+++ b/modules/video_output/android/android_window.c
@@ -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;



More information about the vlc-commits mailing list