[vlc-commits] vout: android: fix possible buffer underwrite with spus
Thomas Guillem
git at videolan.org
Wed May 9 17:30:24 CEST 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed May 9 17:27:03 2018 +0200| [07a9566cbaf16124f9ac7b53cb48415cb3502e37] | committer: Thomas Guillem
vout: android: fix possible buffer underwrite with spus
(cherry picked from commit 4ef28fc0df5419d3dc59b6d91fe9498ce1a1d900)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=07a9566cbaf16124f9ac7b53cb48415cb3502e37
---
modules/video_output/android/display.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/video_output/android/display.c b/modules/video_output/android/display.c
index 2f6b8178d1..90b428be14 100644
--- a/modules/video_output/android/display.c
+++ b/modules/video_output/android/display.c
@@ -976,6 +976,10 @@ static void SubtitleRegionToBounds(subpicture_t *subpicture,
new_bounds.left = r->i_x;
new_bounds.top = r->i_y;
+ if (new_bounds.left < 0)
+ new_bounds.left = 0;
+ if (new_bounds.top < 0)
+ new_bounds.top = 0;
new_bounds.right = r->fmt.i_visible_width + r->i_x;
new_bounds.bottom = r->fmt.i_visible_height + r->i_y;
if (r == &subpicture->p_region[0])
More information about the vlc-commits
mailing list