[vlc-commits] access: bluray: check overlay number

Francois Cartegnie git at videolan.org
Mon Mar 9 15:01:21 CET 2020


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Mar  9 14:29:17 2020 +0100| [4df075b46325a6d8721e619639e4398359b88d5e] | committer: Francois Cartegnie

access: bluray: check overlay number

should not happen for now, but 3D comments of libbluray
mentions possible additional overlays

(cherry picked from commit 11443e26eaca84755b0d3417a82a780cc5e628cc)

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

 modules/access/bluray.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 21c5d46081..fc55b6c5de 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -1833,6 +1833,9 @@ static void blurayOverlayProc(void *ptr, const BD_OVERLAY *const overlay)
         return;
     }
 
+    if(overlay->plane >= MAX_OVERLAY)
+        return;
+
     switch (overlay->cmd) {
     case BD_OVERLAY_INIT:
         msg_Info(p_demux, "Initializing overlay");
@@ -1937,6 +1940,9 @@ static void blurayArgbOverlayProc(void *ptr, const BD_ARGB_OVERLAY *const overla
     demux_t *p_demux = (demux_t*)ptr;
     demux_sys_t *p_sys = p_demux->p_sys;
 
+    if(overlay->plane >= MAX_OVERLAY)
+        return;
+
     switch (overlay->cmd) {
     case BD_ARGB_OVERLAY_INIT:
         vlc_mutex_lock(&p_sys->bdj_overlay_lock);



More information about the vlc-commits mailing list