浏览代码

This will probably fix the incorrect parsing of literals inside
bodystructures. Somehow the offset of $i was incorrect when returning in the
parser. Note: due to the trial and error way (in some design fases) of programming when writing the
structure parser things has come a bit too complex. I have already developed
a new parser that will be used for 1.5. That parser will be a lot easier to
follow and less bug sensitive like the one we use now.

stekkel 22 年之前
父节点
当前提交
f082b4c5b6
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      class/mime/Message.class.php

+ 4 - 1
class/mime/Message.class.php

@@ -387,7 +387,7 @@ class Message {
                     $arg_a[] = $this->parseLiteral($read, $i);
 		    /* temp bugfix (SM 1.5 will have a working clean version)
 		       too much work to implement that version right now */
-		    --$i;
+//		    --$i;
                     ++$arg_no;
                     break;
                 case 'N':
@@ -465,6 +465,9 @@ class Message {
 	   /* Now read the literal */
 	   $s = ($lit_cnt ? substr($read,$i,$lit_cnt): '');
 	   $i += $lit_cnt;
+	   /* temp bugfix (SM 1.5 will have a working clean version)
+	      too much work to implement that version right now */
+	   --$i;
 	} else { /* should never happen */
 	   $i += 3; /* } + \r + \n */
 	   $s = '';