Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-8238

Infinite loop in truncate_string

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 3.0.x
    • 3.0.5
    • Posting
    • None
    • PHP Environment: 5.2.6
      Database: MySQL 5.0.37

    Description

      The function truncate_string will be trapped in an infinite loop, when given a half-baked non-unicode string. The attachment is a script to trigger the infinite loop.

      Fix:
      change
      while (utf8_strlen($string) > $max_store_length || !sizeof($chars));
      to
      while (utf8_strlen($string) > $max_store_length || sizeof($chars));

      Attachments

        Activity

          People

            Acyd Burn Meik Sievertsen [X] (Inactive)
            julesmules julesmules
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: