From 71e29dd57c000e60c0356d517b1e2c80961d5fd6 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Thu, 25 Jul 2024 06:09:57 -0700 Subject: [PATCH] Handle article with missing boundary line in message.inc.php. --- Rocksolid_Light/rocksolid/lib/message.inc.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Rocksolid_Light/rocksolid/lib/message.inc.php b/Rocksolid_Light/rocksolid/lib/message.inc.php index ff25598..c7e5024 100644 --- a/Rocksolid_Light/rocksolid/lib/message.inc.php +++ b/Rocksolid_Light/rocksolid/lib/message.inc.php @@ -49,9 +49,14 @@ function message_parse($rawmessage) // We have multible bodies, so we split the message into its parts $boundary = "--" . $message->header->content_type_boundary; // lets find the first part - while ($rawmessage[$i] != $boundary) + + while ($rawmessage[$i] != $boundary) { + if(!$rawmessage[$i]) { + break; + } + $i ++; + } $i ++; - $i ++; $part = array(); while ($i <= $count_rawmessage) { if (($rawmessage[$i] == $boundary) || ($i == $count_rawmessage - 1) || ($rawmessage[$i] == $boundary . '--')) {