Re: load continuously for some emails in some languages with utf-8 charset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> 100% CPU load after clicking the "Submit" button??  Do you mean after
>> you click "Submit" and go to the INBOX message list?  Or do you really
>> mean the Display Options page "Submit" button locked up the server??
>
> while() cycle in sm_truncate_string() assumes that strpos/mb_strpos advances
> to next symbol. In some conditions (mbstring + raw gb2313 text + utf-8
> charset used by translation + some PHP version, at least 5.3.13)

I think you mean 5.2.13

> it does not
> advance. If you want better explanation, I can split that string into hex
> codes and try to find what is specific in position which locks the cycle.

What do you mean by "does not advance?"  i.e., mb_strpos($haystack,
$needle, $offset, $charset) === $offset?  If I fake this condition by
returning $offset from sq_strpos(), this still won't create an
infinite loop, because eventually the entity start position variable
is incremented beyond the allowable maximum character count.

However, if mb_strpos() is returning 0 (zero) instead of FALSE as it
should, this *does* create an infinite loop.  I have uploaded a new
patch for this condition to the tracker I previously mentioned.
Testers are appreciated.

-- 
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users



[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux