Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.6.0a3

Bug #8338 convert_uudecode removes spaces from line ends, causing corruption
Submitted: 2006-08-01 09:21 UTC Modified: 2006-12-14 02:25 UTC
From: markhewitt at file56 dot com Assigned: aidan
Status: Closed Package: PHP_Compat (version 1.5.0)
PHP Version: 4.4.2 OS: Windows XP/FreeBSD 4.x
Roadmaps: 1.6.0a1    
Subscription  


 [2006-08-01 09:21 UTC] markhewitt at file56 dot com (Mark Hewitt)
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.

Comments

 [2006-12-14 02:25 UTC] aidan (Aidan Lister)
Thanks, this is now fixed in CVS.