From 17ddc46a041053ad32f460cced1e5abf5a8225e6 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 1 Jul 2009 16:57:35 -0600 Subject: [PATCH] Less resource intensive search for null character --- framework/Mime/lib/Horde/Mime/Part.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)) { -- 2.11.0