[libbluray-devel] BDGraphics: fix out of array bounds access

Ian Curtis git at videolan.org
Sun Apr 6 22:47:10 CEST 2014


libbluray | branch: master | Ian Curtis <i.curtis at gmail.com> | Sun Apr  6 23:43:50 2014 +0300| [3583535dbc7b0af14d4d966eebe48ec590078b74] | committer: hpi1

BDGraphics: fix out of array bounds access

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

 src/libbluray/bdj/java/java/awt/BDGraphicsBase.java |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java b/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java
index 7bdaefa..a4762c5 100644
--- a/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java
+++ b/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java
@@ -1100,6 +1100,7 @@ abstract class BDGraphicsBase extends Graphics2D implements ConstrainableGraphic
                 temp[(i * 2) + 1] = pixels[offset + i];
             }
 
+            scansize = 2;
             pixels = temp;
             offset = 0;
             sw = 2;
@@ -1110,6 +1111,7 @@ abstract class BDGraphicsBase extends Graphics2D implements ConstrainableGraphic
             System.arraycopy(pixels, offset, temp,  0, sw);
             System.arraycopy(pixels, offset, temp, sw, sw);
 
+            scansize = sw;
             pixels = temp;
             offset = 0;
             sh = 2;



More information about the libbluray-devel mailing list