Index: trunk/phase3/includes/media/XCF.php |
— | — | @@ -78,6 +78,7 @@ |
79 | 79 | # 1: Grayscale |
80 | 80 | # 2: Indexed color |
81 | 81 | # (enum GimpImageBaseType in libgimpbase/gimpbaseenums.h) |
| 82 | + wfSuppressWarnings(); |
82 | 83 | $header = unpack( |
83 | 84 | "A9magic" # A: space padded |
84 | 85 | . "/a5version" # a: zero padded |
— | — | @@ -86,7 +87,12 @@ |
87 | 88 | . "/Nbase_type" # / |
88 | 89 | , $binaryHeader |
89 | 90 | ); |
| 91 | + wfRestoreWarnings(); |
90 | 92 | |
| 93 | + if( $header === false ) { |
| 94 | + return false; |
| 95 | + } |
| 96 | + |
91 | 97 | # Check values |
92 | 98 | if( $header['magic'] !== 'gimp xcf' ) { |
93 | 99 | wfDebug( __METHOD__ . " '$filename' has invalid magic signature.\n" ); |