Skip to content

Commit

Permalink
Fix bug where last character of a filename extracted from TNEF could …
Browse files Browse the repository at this point in the history
…be truncated (#5799)
  • Loading branch information
alecpl committed Aug 8, 2017
1 parent c1285a0 commit b629842
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions program/lib/Roundcube/rcube_tnef_decoder.php
Expand Up @@ -387,8 +387,6 @@ protected function _decodeAttachment(&$data, &$attachment_data)
*/
protected function convertString($str, $use_codepage = false)
{
$str = rtrim($str, "\0");

if ($convert && $this->codepage
&& ($charset = rcube_charset::$windows_codepages[$this->codepage])
) {
Expand All @@ -398,6 +396,8 @@ protected function convertString($str, $use_codepage = false)
$str = rcube_charset::convert($str, 'UTF-16LE');
}

$str = rtrim($str, "\0");

return $str;
}
}

0 comments on commit b629842

Please sign in to comment.