Changeset 6722 for extensions/AMetaData/JpegMetaData
- Timestamp:
- Jul 28, 2010, 10:48:17 AM (14 years ago)
- Location:
- extensions/AMetaData/JpegMetaData
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMetaData/JpegMetaData/JpegMetaData.class.php
r5789 r6722 3 3 * --:: JPEG MetaDatas ::------------------------------------------------------- 4 4 * 5 * Version : 1.0. 06 * Date : 20 09/12/265 * Version : 1.0.1 6 * Date : 2010-07-24 7 7 * 8 8 * Author : Grum … … 39 39 * | 0.1.0a | 2009-12-26 | 40 40 * | | | 41 * | | | 42 * | | | 41 * | 1.0.0 | | * first public release 42 * | | | 43 * | 1.0.1 | 2010-07-24 | * mantis bug:1686 44 * | | | . bug reported on IfdReader 45 * | | | When sub IFD (0x8769) refers to a sub IFD with 46 * | | | an offset lower than the current IFD, the reader 47 * | | | loops on the current data block and terminate 48 * | | | with an error 500 ; fix consist to ignore this 49 * | | | kind of offset, but it's not the right solution 50 * | | | (right solution: to be able to read negative 51 * | | | offset) 52 * | | | * mantis feature : 1719 53 * | | | . Coding a DateTime class ; used only if there is 54 * | | | no PHP built-in DateTime class 43 55 * | | | 44 56 * | | | … … 112 124 define("JPEG_METADATA_DIR", dirname(__FILE__)."/"); 113 125 126 require_once(JPEG_METADATA_DIR."Common/DateTime.class.php"); 114 127 require_once(JPEG_METADATA_DIR."Readers/JpegReader.class.php"); 115 128 require_once(JPEG_METADATA_DIR."TagDefinitions/MagicTags.class.php"); -
extensions/AMetaData/JpegMetaData/Readers/IfdReader.class.php
r5222 r6722 107 107 $this->dataOffset=$offset; 108 108 109 109 110 $this->skipHeader($this->headerSize); 110 111 112 113 111 114 $dataPointer = $this->data->offset(); 115 112 116 /* 113 117 * number of entries is defined byte an UShort at the begining of the … … 422 426 * the returned value is a parsed sub IFD 423 427 */ 424 $returned=new IfdReader($this->data->readASCII(-1,$values-$this->dataOffset), $values, $this->byteOrder); 428 if($values>$this->dataOffset) 429 { 430 $returned=new IfdReader($this->data->readASCII(-1,$values-$this->dataOffset), $values, $this->byteOrder); 431 } 432 else 433 { 434 /* ELSE implemented with the mantis bug:1686 435 * when the offset of a sub IFD tag is lower than the offset of the 436 * current IFD, ignore the sub IFD 437 * 438 * A method have to be coded to manage this kind of sub IFD 439 */ 440 $returned="Feature not implemented: read negative offset"; 441 } 425 442 break; 426 443 case 0x8825: // GPS IFD Pointer, tag 0x8825
Note: See TracChangeset
for help on using the changeset viewer.