[prev in list] [next in list] [prev in thread] [next in thread]
List: squirrelmail-devel
Subject: [SM-DEVEL] patch for warning when opening inbox
From: Jessica Brennan <jib () panix ! com>
Date: 2004-09-29 14:10:30
Message-ID: Pine.NEB.4.61.0409291004300.18655 () panix5 ! panix ! com
[Download RAW message or body]
When opening my inbox I would sometimes get the following warning with
squirrelmail 1.4.3a:
Warning: strpos(): Offset not contained in string. in
/htdocs/sm/functions/mailbox_display.php on line 1216
This can be fixed by just making sure that $ent_loc+3 is within the string
before calling strpos. You may want to add this for the next squirrelmail
release.
--- squirrelmail-1.4.3a-virgin/functions/mailbox_display.php Mon Apr 19
12:21:53 2004
+++ squirrelmail-1.4.3a/functions/mailbox_display.php Tue Aug 24
10:57:53 2004
@@ -1213,6 +1213,7 @@
*/
$step = $ent_loc = 0;
while ( $ent_loc < $trim_val && (($ent_loc = strpos($subject, '&',
$ent_offset)) !== false) &&
+ (($ent_loc+3) <= $orig_len) &&
(($ent_loc_end = strpos($subject, ';', $ent_loc+3)) !==
false) ) {
$trim_val += ($ent_loc_end-$ent_loc);
$ent_offset = $ent_loc_end+1;
-Jessica
~~~~~~~~~~~~~~
jib@panix.com
Panix Staff
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
--
squirrelmail-devel mailing list
Posting Guidelines: http://squirrelmail.org/wiki/wiki.php?MailingListPostingGuidelines
List Address: squirrelmail-devel@lists.sourceforge.net
List Archives: http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.devel
List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=7139
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic