~ubuntu-branches/debian/sid/wordpress/sid

« back to all changes in this revision

Viewing changes to debian/missing-sources/plupload-1.5.7/flash/plupload/src/com/mxi/image/PNG.as

  • Committer: Package Import Robot
  • Author(s): Raphaël Hertzog
  • Date: 2013-09-04 23:18:58 UTC
  • mfrom: (1.2.28)
  • Revision ID: package-import@ubuntu.com-20130904231858-nljmn1buzswh63jk
Tags: 3.6+dfsg-1
* New upstream release.
* Improve wp-settings to verify that $_SERVER['HTTP_X_FORWARDED_PROTO']
  exists before accessing it (avoids a PHP notice).
  Thanks to Paul Dreik <slask@pauldreik.se> for the report and the patch.
* Document in README.Debian the need to login to /wp-admin/ to complete
  an upgrade.
* Drop useless debian/README.source
* Drop 008CVE2008-2392.patch since upstream now disables unfiltered
  uploads by default. See http://core.trac.wordpress.org/ticket/10692
* Drop 009CVE2008-6767.patch since the backto parameter is validated
  against a whitelist, and externally triggered upgrades are not a
  security problem as long as they work.
* Update debian/missing-sources with latest versions.
* Update upstream l10n.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * Copyright 2011, Moxiecode Systems AB
 
3
 * Released under GPL License.
 
4
 *
 
5
 * License: http://www.plupload.com/license
 
6
 * Contributing: http://www.plupload.com/contributing
 
7
 */
 
8
 
 
9
package com.mxi.image
 
10
{
 
11
        import com.mxi.BinaryReader;
 
12
        import flash.utils.ByteArray;
 
13
        
 
14
        public class PNG 
 
15
        {               
 
16
                protected var _br:BinaryReader;
 
17
                
 
18
                public function PNG(binData:ByteArray)
 
19
                {
 
20
                        _br = new BinaryReader;
 
21
                        _br.init(binData);
 
22
                }
 
23
                
 
24
                
 
25
                static public function test(binData:ByteArray) : Boolean
 
26
                {
 
27
                        var sign:Array = [ 137, 80, 78, 71, 13, 10, 26, 10 ];
 
28
                        
 
29
                        for (var i:int = sign.length - 1; i >= 0 ; i--) {
 
30
                                if (binData[i] != sign[i]) {
 
31
                                        return false;
 
32
                                }
 
33
                        }
 
34
                        return true;
 
35
                }
 
36
                
 
37
                
 
38
                public function info() : Object
 
39
                {
 
40
                        var chunk:Object, idx:uint;
 
41
                        
 
42
                        chunk = _getChunkAt(8);
 
43
                        
 
44
                        if (chunk.type == 'IHDR') {
 
45
                                idx = chunk.start;
 
46
                                return {
 
47
                                        width: _br.LONG(idx),
 
48
                                        height: _br.LONG(idx += 4)
 
49
                                };
 
50
                        }
 
51
                                
 
52
                        return null;
 
53
                }
 
54
                
 
55
                
 
56
                private function _getChunkAt(idx:uint) : Object
 
57
                {
 
58
                        var length:uint, type:String, start:uint, CRC:uint;
 
59
                        
 
60
                        length = _br.LONG(idx);
 
61
                        type = _br.STRING(idx += 4, 4);
 
62
                        start = idx += 4;       
 
63
                        CRC = _br.LONG(idx + length);
 
64
                        
 
65
                        return {
 
66
                                length: length,
 
67
                                type: type,
 
68
                                start: start,
 
69
                                CRC: CRC
 
70
                        };
 
71
                }
 
72
                
 
73
                
 
74
                
 
75
        }
 
76
 
 
77
}
 
 
b'\\ No newline at end of file'