PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » PHP » PHP_Compat » Bug #8338

convert_uudecode removes spaces from line ends, causing corruption

Details

Submitted2006-08-01 14:21 UTC
Frommarkhewitt at file56 dot com
Assignedaidan
StatusClosed
PackagePHP_Compat
PHP Version4.4.2
OSWindows XP/FreeBSD 4.x
Roadmaps1.6.0a1

Comments

[2006-08-01 14:21 UTC] markhewitt at file56 dot com

Description:
------------
I have used covert_uudecode module now to decrypt some PDF content.

I found that the result is always corrupted, and the problem would appear to be in line 52,

$c = count($bytes = unpack('c*', substr(trim($line), 1)));

The trim(...) operation is removing not only trailing line breaks but also any spaces that may be part of the legitimate content. Modifying line 52 to read:

$c = count($bytes = unpack('c*', substr(trim($line,"\r\n\t"), 1)));

would seem to correct this problem.