[vlc-devel] [PATCH] android_window: check subtitles bounds
Thomas Guillem
thomas at gllm.fr
Mon Dec 29 18:45:12 CET 2014
(fixes #13350)
---
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;
--
2.1.3
More information about the vlc-devel
mailing list