dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2560f18
)
XCF: suppress warning on unpack + early exit on error
author
Antoine Musso
<hashar@users.mediawiki.org>
Fri, 6 Jan 2012 16:17:04 +0000
(16:17 +0000)
committer
Antoine Musso
<hashar@users.mediawiki.org>
Fri, 6 Jan 2012 16:17:04 +0000
(16:17 +0000)
follow r108141
includes/media/XCF.php
patch
|
blob
|
history
diff --git
a/includes/media/XCF.php
b/includes/media/XCF.php
index
385e988
..
b113d70
100644
(file)
--- a/
includes/media/XCF.php
+++ b/
includes/media/XCF.php
@@
-78,6
+78,7
@@
class XCFHandler extends BitmapHandler {
# 1: Grayscale
# 2: Indexed color
# (enum GimpImageBaseType in libgimpbase/gimpbaseenums.h)
+ wfSuppressWarnings();
$header = unpack(
"A9magic" # A: space padded
. "/a5version" # a: zero padded
@@
-86,6
+87,11
@@
class XCFHandler extends BitmapHandler {
. "/Nbase_type" # /
, $binaryHeader
);
+ wfRestoreWarnings();
+
+ if( $header === false ) {
+ return false;
+ }
# Check values
if( $header['magic'] !== 'gimp xcf' ) {