Skip to content

Commit

Permalink
Looks like at least some TNEF files don't contain the VERSION data.
Browse files Browse the repository at this point in the history
It's legacy, and can be set to anything, but it's supposed to
still be present. Either way, only parse it if we find the VERSION
attribute instead of assuming it's there.
  • Loading branch information
mrubinsk committed Jan 31, 2015
1 parent 872996c commit ddae30f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions framework/Compress/lib/Horde/Compress/Tnef.php
Expand Up @@ -245,11 +245,6 @@ public function decompress($data, array $params = array())
$this->_geti($data, 16))
);

// Version
$this->_geti($data, 8); // LVL_MESSAGE
$this->_getx($data, $this->_geti($data, 32)); //AVERSION
$this->_geti($data, 16); //checksum

$out = array();
$this->_msgInfo = new Horde_Compress_Tnef_MessageData($this->_logger);
while (strlen($data) > 0) {
Expand Down Expand Up @@ -626,6 +621,11 @@ protected function _decodeMessageProperty(&$data)
$this->_geti($data, $this->_geti($data, 32));
$this->_geti($data, 16); //checksum
break;
case self::AVERSION:
// Version
$this->_getx($data, $this->_geti($data, 32)); //AVERSION
$this->_geti($data, 16); //checksum
break;
case self::AFROM:
case self::ASENTFOR:
$display_name = $this->_getx($data, $this->_geti($data, 16));
Expand Down

0 comments on commit ddae30f

Please sign in to comment.