[Hastymail-cvs] SF.net SVN: hastymail:[2141] trunk/hastymail2/lib/url_action_classes/ compose.php
Brought to you by:
sailfrog,
slushpupie
From: <sai...@us...> - 2013-01-08 14:33:33
|
Revision: 2141 http://hastymail.svn.sourceforge.net/hastymail/?rev=2141&view=rev Author: sailfrog Date: 2013-01-08 14:33:27 +0000 (Tue, 08 Jan 2013) Log Message: ----------- fix a possible attachment corrupting bug in the base64 encoding routine. Requires an input file with long lines to possibly trigger the bug. Modified Paths: -------------- trunk/hastymail2/lib/url_action_classes/compose.php Modified: trunk/hastymail2/lib/url_action_classes/compose.php =================================================================== --- trunk/hastymail2/lib/url_action_classes/compose.php 2012-12-28 21:56:51 UTC (rev 2140) +++ trunk/hastymail2/lib/url_action_classes/compose.php 2013-01-08 14:33:27 UTC (rev 2141) @@ -488,7 +488,7 @@ $size = 0; $left_over = ''; while (!feof($input_file)) { - $clear = fgets($input_file, 1024); + $clear = fgets($input_file, 1025); if ($left_over) { $clear = $left_over.$clear; } @@ -500,10 +500,6 @@ $left_over = ''; $data = substr($data, 76); } - elseif (strlen($data) < 76) { - $left_over = base64_decode($data); - $data = ''; - } else { $left_over = base64_decode($data); $data = ''; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |