|
|
@ -493,21 +493,21 @@ class rcube_tnef_decoder
|
|
|
|
$length_preload = strlen($preload);
|
|
|
|
$length_preload = strlen($preload);
|
|
|
|
|
|
|
|
|
|
|
|
for ($cnt = 0; $cnt < $length_preload; $cnt++) {
|
|
|
|
for ($cnt = 0; $cnt < $length_preload; $cnt++) {
|
|
|
|
$uncomp .= $preload{$cnt};
|
|
|
|
$uncomp .= $preload[$cnt];
|
|
|
|
++$out;
|
|
|
|
++$out;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
while ($out < ($size + $length_preload)) {
|
|
|
|
while ($out < ($size + $length_preload)) {
|
|
|
|
if (($flag_count++ % 8) == 0) {
|
|
|
|
if (($flag_count++ % 8) == 0) {
|
|
|
|
$flags = ord($data{$in++});
|
|
|
|
$flags = ord($data[$in++]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
$flags = $flags >> 1;
|
|
|
|
$flags = $flags >> 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (($flags & 1) != 0) {
|
|
|
|
if (($flags & 1) != 0) {
|
|
|
|
$offset = ord($data{$in++});
|
|
|
|
$offset = ord($data[$in++]);
|
|
|
|
$length = ord($data{$in++});
|
|
|
|
$length = ord($data[$in++]);
|
|
|
|
$offset = ($offset << 4) | ($length >> 4);
|
|
|
|
$offset = ($offset << 4) | ($length >> 4);
|
|
|
|
$length = ($length & 0xF) + 2;
|
|
|
|
$length = ($length & 0xF) + 2;
|
|
|
|
$offset = ((int)($out / 4096)) * 4096 + $offset;
|
|
|
|
$offset = ((int)($out / 4096)) * 4096 + $offset;
|
|
|
@ -524,7 +524,7 @@ class rcube_tnef_decoder
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
$uncomp .= $data{$in++};
|
|
|
|
$uncomp .= $data[$in++];
|
|
|
|
++$out;
|
|
|
|
++$out;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|