summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5b48c75)
raw | patch | inline | side by side (parent: 5b48c75)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 Oct 2006 09:05:42 +0000 (09:05 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 Oct 2006 09:05:42 +0000 (09:05 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4907 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_sieve.inc | patch | blob | history |
index bdbf7d6fdbea70af45a0fa4b34dc92128a00b9f4..16b50f6877dfce6b0d92ac44aed2812371869b16 100644 (file)
--- a/include/class_sieve.inc
+++ b/include/class_sieve.inc
$this->error_raw[]=substr($this->line, 0, strlen($this->line) -2); //we want to be nice and strip crlf's
$this->err_recv = strlen($this->line);
- while($this->err_recv < $this->err_len){
+ /* Avoid loop till memory is full
+ This can happen if sieve script is modified via external scripts and not by gosa .. */
+ $max = 10000;
+ $cur = 0 ;
+ while($this->err_recv < $this->err_len && ($cur < $max)){
//print "<br>Trying to receive ".($this->err_len-$this->err_recv)." bytes for result<br>";
+ $cur ++ ;
$this->line = fgets($this->fp, ($this->err_len-$this->err_recv));
$this->error_raw[]=substr($this->line, 0, strlen($this->line) -2); //we want to be nice and strip crlf's
$this->err_recv += strlen($this->line);