|
Bugzilla – Bug 67 |
TiffDecoder should not freely combine path names |
Last modified: 2009-09-01 13:06:08 CDT |
| ⚠ |
NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug. The Fiji project now uses GitHub Issues for issue tracking. Please file all new issues there. |
| TiffDecoder should not freely combine path names | |
|
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
|||||
Here's a test case written in Clojure: (import '(java.io File) '(ij.io TiffDecoder)) (let [directory "test" filename "image.png" file (File. directory filename) path (.getPath file) decoder (TiffDecoder. (.getParent file) (.getName file))] (try (.getTiffInfo decoder) (catch Exception e (println "Path name should be" path "not" (.getMessage e))))) This prints: Path name should be test/image.png not testimage.png (The system cannot find the file specified) The fix is available in http://a-chinaman.com/~duncan/patches/0001-Don-t-freely-combine-path-names-and-use-File-instead.patchCreated attachment 5 Proposed fix