[vlc-commits] vout: android: fix possible buffer underwrite with spus
vlc/vlc-3.0 | branch: master | Thomas Guillem | 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 > 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]) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] vout: android: fix possible buffer underwrite with spus
vlc | branch: master | Thomas Guillem | Wed May 9 17:27:03 2018 +0200| [4ef28fc0df5419d3dc59b6d91fe9498ce1a1d900] | committer: Thomas Guillem vout: android: fix possible buffer underwrite with spus > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4ef28fc0df5419d3dc59b6d91fe9498ce1a1d900 --- 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 e779f9e939..97ebf5d479 100644 --- a/modules/video_output/android/display.c +++ b/modules/video_output/android/display.c @@ -823,6 +823,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]) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits