[libbluray-devel] Check for null

hpi1 git at videolan.org
Sun May 15 15:44:39 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sun May 15 16:13:58 2016 +0300| [e4bf2c99f7662e6beb870d8feeef7bfd7c708ebd] | committer: hpi1

Check for null

Fixes crash with HDMV-2D test disc

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

 src/libbluray/decoders/graphics_controller.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/libbluray/decoders/graphics_controller.c b/src/libbluray/decoders/graphics_controller.c
index d3c775a..98f3239 100644
--- a/src/libbluray/decoders/graphics_controller.c
+++ b/src/libbluray/decoders/graphics_controller.c
@@ -361,6 +361,10 @@ static int _save_page_state(GRAPHICS_CONTROLLER *gc)
         GC_TRACE("_save_page_state(): no bog data !\n");
         return -1;
     }
+    if (!gc->igs || !gc->igs->ics) {
+        GC_TRACE("_save_page_state(): no IG composition\n");
+        return -1;
+    }
 
     PG_DISPLAY_SET *s       = gc->igs;
     BD_IG_PAGE     *page    = NULL;



More information about the libbluray-devel mailing list