OpenJDK / jdk / jdk10
changeset 21589:7bb6e98b1dfb
8028206: sun/java2d/cmm/ProfileOp/SetDataTest.java fails
Reviewed-by: bae, jchen
author | prr |
---|---|
date | Wed, 13 Nov 2013 11:59:49 -0800 |
parents | 14f6dddbb916 |
children | 25f549d9b89a 31823abc2258 |
files | jdk/src/share/native/sun/java2d/cmm/lcms/cmsio0.c jdk/test/sun/java2d/cmm/ProfileOp/SetDataTest.java |
diffstat | 2 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio0.c Thu Nov 07 08:16:26 2013 -0800 +++ b/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio0.c Wed Nov 13 11:59:49 2013 -0800 @@ -1077,7 +1077,13 @@ static cmsBool SanityCheck(_cmsICCPROFILE* profile) { - cmsIOHANDLER* io = profile->IOhandler; + cmsIOHANDLER* io; + + if (!profile) { + return FALSE; + } + + io = profile->IOhandler; if (!io) { return FALSE; } @@ -1108,8 +1114,6 @@ cmsTagTypeSignature TypeBase; cmsTagTypeHandler* TypeHandler; - if (!SanityCheck(FileOrig)) return FALSE; - for (i=0; i < Icc -> TagCount; i++) { @@ -1126,7 +1130,7 @@ // Reach here if we are copying a tag from a disk-based ICC profile which has not been modified by user. // In this case a blind copy of the block data is performed - if (FileOrig != NULL && Icc -> TagOffsets[i]) { + if (SanityCheck(FileOrig) && Icc -> TagOffsets[i]) { cmsUInt32Number TagSize = FileOrig -> TagSizes[i]; cmsUInt32Number TagOffset = FileOrig -> TagOffsets[i];
--- a/jdk/test/sun/java2d/cmm/ProfileOp/SetDataTest.java Thu Nov 07 08:16:26 2013 -0800 +++ b/jdk/test/sun/java2d/cmm/ProfileOp/SetDataTest.java Wed Nov 13 11:59:49 2013 -0800 @@ -23,7 +23,7 @@ /** * @test - * @bug 7042594 + * @bug 7042594 8028206 * @summary Test verifies that ICC_Profile.setData() conforms the spec. * * @run main SetDataTest