[libbluray-devel] bdjo/GraphicsResolution: log unknown value, default to FHD

hpi1 git at videolan.org
Wed Aug 30 08:51:55 CEST 2017


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Aug 28 18:02:26 2017 +0300| [86e68248d27fe94dd7c85dc4052206d045ebb42f] | committer: hpi1

bdjo/GraphicsResolution: log unknown value, default to FHD

Fixes loader null pointer deref on unknown value

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

 src/libbluray/bdj/java/org/videolan/bdjo/GraphicsResolution.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/libbluray/bdj/java/org/videolan/bdjo/GraphicsResolution.java b/src/libbluray/bdj/java/org/videolan/bdjo/GraphicsResolution.java
index 006d120a..5cc697dd 100644
--- a/src/libbluray/bdj/java/org/videolan/bdjo/GraphicsResolution.java
+++ b/src/libbluray/bdj/java/org/videolan/bdjo/GraphicsResolution.java
@@ -63,7 +63,9 @@ public class GraphicsResolution {
         case 7:
             return UHD_1920_1080;
         }
-        return null;
+
+        org.videolan.Logger.getLogger(GraphicsResolution.class.getName()).error("unknown graphics resolution ID " + id);
+        return HD_1920_1080;
     }
 
     private final int id;



More information about the libbluray-devel mailing list