From: Michael M Slusarz Date: Wed, 1 Jul 2009 22:57:35 +0000 (-0600) Subject: Less resource intensive search for null character X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=17ddc46a041053ad32f460cced1e5abf5a8225e6;p=horde.git Less resource intensive search for null character --- diff --git a/framework/Mime/lib/Horde/Mime/Part.php b/framework/Mime/lib/Horde/Mime/Part.php index f703c6cbf..2a1e496af 100644 --- a/framework/Mime/lib/Horde/Mime/Part.php +++ b/framework/Mime/lib/Horde/Mime/Part.php @@ -1555,8 +1555,10 @@ class Horde_Mime_Part break; case 'binary': - $data = '/\x00/'; - // Fall through + if (strpos($line, null) !== false) { + return true; + } + break; case 'preg': if (preg_match($data, $line)) {