changeset 9167:2c85d158a09c 8u51-b08

Automated merge with http://closedjdk.us.oracle.com/openjfx/8u45/rt
author kcr
date Mon, 13 Apr 2015 11:18:56 -0700
parents 465e8d0dadc4 0fb0ee8b5850
children ade8a190f441 1f6939b73280
files .hgtags
diffstat 7 files changed, 69 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Apr 13 11:09:59 2015 -0700
+++ b/.hgtags	Mon Apr 13 11:18:56 2015 -0700
@@ -238,12 +238,19 @@
 eb272f8584c8346d7438e2b23d0661980d512c07 8u45-b07
 6cc08ec1ea825b4bd1273e522e61e1b9efda4172 8u40-b25
 9a0bb4610ea0e3fe93008c8ddf2757fdb9c3be35 8u45-b08
+d488fa8851887680a690803f28112ed0a0776e53 8u51-b01
 298ec4ec6b354f2eb74a200b3415bc4566ddc1a7 8u40-b26
 88882082520b7195b4e669955782ffc6757db7ac 8u45-b09
+1a31f06296ebb5d60cc22fe43420e430d6ecba61 8u51-b02
 e00e97499831954b5126d96da1299b1ecdf69e15 8u40-b27
 f5b6e9bfedc64c3bc27d1fdd8888f5386b9c9f36 8u45-b10
+93a6bf73d3d06258dd48f958ec4f2eb91b1a7871 8u51-b03
 f5b6e9bfedc64c3bc27d1fdd8888f5386b9c9f36 8u45-b11
+2c2927b800ee06cf2a0216b07f0c7a1aa92e85b5 8u51-b04
 63e96de9d0965ad671cc7694a15b651a15dff9ed 8u45-b12
 93e3b40039ac3c0d6086e15d86dc8127d28f1587 8u45-b13
+8f360f8f1f9a4c12856a085b8c732e27963d3c23 8u51-b05
+e7d9670a725c567dd5d7161865b16983b0929a1b 8u51-b06
 f5b6e9bfedc64c3bc27d1fdd8888f5386b9c9f36 8u45-b11
 b7d32ba7de74acdc83b06ca4d82c6c5e30946cd8 8u45-b11
+9623a72711f88683fc1e4f2c5a2bfc9c565a6544 8u51-b07
--- a/build.gradle	Mon Apr 13 11:09:59 2015 -0700
+++ b/build.gradle	Mon Apr 13 11:18:56 2015 -0700
@@ -3128,6 +3128,8 @@
             javafxProperties.delete()
             javafxProperties << "javafx.runtime.version=$RAW_VERSION";
             javafxProperties << "\n"
+            javafxProperties << "javafx.runtime.build=b$PROMOTED_BUILD_NUMBER";
+            javafxProperties << "\n"
             // Include any properties that have been defined (most likely in
             // one of the various platform gradle files)
             if (targetProperties.containsKey("javafxProperties")) {
--- a/build.properties	Mon Apr 13 11:09:59 2015 -0700
+++ b/build.properties	Mon Apr 13 11:18:56 2015 -0700
@@ -30,13 +30,13 @@
 ##############################################################################
 
 # Note: The expected value for milestone are [alpha, beta, dev, ea, fcs]
-jfx.release.milestone=fcs
+jfx.release.milestone=ea
 # Note: For fcs builds the suffix should be blank
-jfx.release.suffix=
-jfx.release.name=8u45
+jfx.release.suffix=-ea
+jfx.release.name=8u51
 jfx.release.major.version=8
 jfx.release.minor.version=0
-jfx.release.micro.version=45
+jfx.release.micro.version=51
 
 ##############################################################################
 #
--- a/modules/graphics/src/main/java/com/sun/javafx/font/CMap.java	Mon Apr 13 11:09:59 2015 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/font/CMap.java	Mon Apr 13 11:18:56 2015 -0700
@@ -45,6 +45,8 @@
     static final int SHORTMASK = 0x0000ffff;
     static final int INTMASK   = 0xffffffff;
 
+    private static final int MAX_CODE_POINTS = 0x10ffff;
+
     static CMap initialize(PrismFontFile font) {
 
         CMap cmap = null;
@@ -472,6 +474,11 @@
              buffer.position(offset+12);
              startCharCode = buffer.getInt() & INTMASK;
              numChars = buffer.getInt() & INTMASK;
+             if (numChars <= 0 || numChars > MAX_CODE_POINTS ||
+                 offset > buffer.capacity() - numChars*2 - 12 - 8)
+             {
+                 throw new RuntimeException("Invalid cmap subtable");   
+             }
              glyphIdArray = new char[numChars];
              for (int i=0; i< numChars; i++) {
                  glyphIdArray[i] = buffer.getChar();
@@ -504,6 +511,11 @@
         CMapFormat12(Buffer buffer, int offset) {
 
             numGroups = buffer.getInt(offset+12);
+            if (numGroups <= 0 || numGroups > MAX_CODE_POINTS ||
+                offset > buffer.capacity() - numGroups*12 - 12 - 4)
+            {
+                throw new RuntimeException("Invalid cmap subtable");
+            }
             startCharCode = new long[numGroups];
             endCharCode = new long[numGroups];
             startGlyphID = new int[numGroups];
--- a/modules/graphics/src/main/java/com/sun/javafx/font/PrismFontFile.java	Mon Apr 13 11:09:59 2015 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/font/PrismFontFile.java	Mon Apr 13 11:18:56 2015 -0700
@@ -512,6 +512,9 @@
 
             setStyle();
 
+            // sanity check the cmap table
+            checkCMAP();
+
             /* Get names last, as the name table is far from the file header.
              * Although its also likely too big to fit in the read cache
              * in which case that would remain valid, but also will help
@@ -824,6 +827,31 @@
         }
     }
 
+    private void checkCMAP() throws Exception {
+        DirectoryEntry cmapDE = getDirectoryEntry(FontConstants.cmapTag);
+        if (cmapDE != null) {
+            if (cmapDE.length < 4) {
+                throw new Exception("Invalid cmap table length");
+            }
+            Buffer cmapTableHeader = filereader.readBlock(cmapDE.offset, 4);
+            short version = cmapTableHeader.getShort();
+            short numberSubTables = cmapTableHeader.getShort();
+            int indexLength = numberSubTables * 8;
+            if (numberSubTables <= 0 || cmapDE.length < indexLength + 4) {
+                throw new Exception("Invalid cmap subtables count");
+            }
+            Buffer cmapTableIndex = filereader.readBlock(cmapDE.offset + 4, indexLength);
+            for (int i = 0; i < numberSubTables; i++) {
+                short platformID = cmapTableIndex.getShort();
+                short encodingID = cmapTableIndex.getShort();
+                int offset = cmapTableIndex.getInt();
+                if (offset < 0 || offset >= cmapDE.length) {
+                    throw new Exception("Invalid cmap subtable offset");
+                }
+            }
+        }
+    }
+    
     /*** BEGIN LOCALE_ID MAPPING ****/
 
     private static Map<String, Short> lcidMap;
--- a/modules/media/src/main/native/gstreamer/plugins/av/videodecoder.c	Mon Apr 13 11:09:59 2015 -0700
+++ b/modules/media/src/main/native/gstreamer/plugins/av/videodecoder.c	Mon Apr 13 11:18:56 2015 -0700
@@ -288,12 +288,19 @@
 {
     BaseDecoder *base = BASEDECODER(decoder);
 
+#if NEW_CODEC_ID
+    int width = base->frame->width;
+    int height = base->frame->height;
+#else
+    int width = base->context->width;
+    int height = base->context->height;
+#endif // NEW_CODEC_ID 
+    
     if (GST_PAD_CAPS(base->srcpad) == NULL ||
-        decoder->width != base->context->width ||
-        decoder->height != base->context->height)
+        decoder->width != width || decoder->height != height)
     {
-        decoder->width = base->context->width;
-        decoder->height = base->context->height;
+        decoder->width = width;
+        decoder->height = height;
 
         decoder->discont = (GST_PAD_CAPS(base->srcpad) != NULL);
 
--- a/modules/web/src/main/native/Source/WebCore/platform/graphics/java/GlyphPageTreeNodeJava.cpp	Mon Apr 13 11:09:59 2015 -0700
+++ b/modules/web/src/main/native/Source/WebCore/platform/graphics/java/GlyphPageTreeNodeJava.cpp	Mon Apr 13 11:18:56 2015 -0700
@@ -23,6 +23,8 @@
     JLocalRef<jcharArray> jchars(env->NewCharArray(bufferLength));
     CheckAndClearException(env); // OOME
     ASSERT(jchars);
+    if (!jchars)
+        return false;
 
     jchar* chars = (jchar*)env->GetPrimitiveArrayCritical(jchars, NULL);
     ASSERT(chars);
@@ -33,6 +35,9 @@
     ASSERT(mid);
     JLocalRef<jintArray> jglyphs(static_cast<jintArray>(env->CallObjectMethod(*jFont, mid, (jcharArray)jchars)));
     CheckAndClearException(env);
+    ASSERT(jglyphs);
+    if (!jglyphs)
+        return false;
 
     Glyph* glyphs = (Glyph*)env->GetPrimitiveArrayCritical(jglyphs, NULL);
     ASSERT(glyphs);