Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-6886

Integer overflow when recalculating attachment filesize sum

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 3.0.3
    • 3.0.0
    • ACP
    • None
    • PHP Environment: 5.2.0 on i686
      Database: MySQL(i) 5.0.32

      In includes/acp/acp_main.php

      $sql = 'SELECT SUM(filesize) as stat    FROM ' . ATTACHMENTS_TABLE . '    WHERE is_orphan = 0';$result = $db->sql_query($sql);set_config('upload_dir_size', (int) $db->sql_fetchfield('stat'), true);$db->sql_freeresult($result); 

      Casting as (int) will show 2048.00 MB after synchronizing statistics, when having more than two GiB of attachments.

            Acyd Burn Meik Sievertsen [X] (Inactive)
            bantu Andreas Fischer [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: