~ubuntu-branches/ubuntu/oneiric/openjdk-7/oneiric-security

« back to all changes in this revision

Viewing changes to debian/patches/icc_loading_with_symlink.diff

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-10-17 16:22:48 UTC
  • mfrom: (1.3.11) (8.1.25 quantal)
  • Revision ID: package-import@ubuntu.com-20121017162248-steblyv2lnk2t951
Tags: 7u9-2.3.3-0ubuntu1~11.10.1
Build IcedTea7 2.3.3 for oneiric.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Allow loading of ICC profiles when jre/lib/cmm is a
 
2
 symlink by disabling call to isChildOf(f, dir) in getStandardProfileFile
 
3
 and getProfileFile methods.
 
4
 .
 
5
 isChildOf method try to ensures f.getCanonicalPath start with
 
6
 dir.getCanonicalPath but, on openjdk-6, dir.getCanonicalPath
 
7
 will resolve to realpath and so won't match.
 
8
 .
 
9
 It should fix "Cannot open file sRGB.pf" errors.
 
10
Author: Damien Raude-Morvan <drazzib@debian.org>
 
11
Last-Update: 2012-05-18
 
12
Bug-Debian: http://bugs.debian.org/641530
 
13
Forwarded: not-yet
 
14
 
 
15
Index: openjdk/jdk/src/share/classes/java/awt/color/ICC_Profile.java
 
16
===================================================================
 
17
--- openjdk/jdk/src/share/classes/java/awt/color/ICC_Profile.java.orig
 
18
+++ openjdk/jdk/src/share/classes/java/awt/color/ICC_Profile.java
 
19
@@ -1821,9 +1821,6 @@
 
20
                     dir = st.nextToken();
 
21
                     fullPath = dir + File.separatorChar + fileName;
 
22
                     f = new File(fullPath);
 
23
-                    if (!isChildOf(f, dir)) {
 
24
-                        f = null;
 
25
-                    }
 
26
                 }
 
27
             }
 
28
 
 
29
@@ -1860,7 +1857,7 @@
 
30
             File.separatorChar + "lib" + File.separatorChar + "cmm";
 
31
         String fullPath = dir + File.separatorChar + fileName;
 
32
         File f = new File(fullPath);
 
33
-        return (f.isFile() && isChildOf(f, dir)) ? f : null;
 
34
+        return (f.isFile()) ? f : null;
 
35
     }
 
36
 
 
37
     /**