Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-26922

Overflow problems on mssql & sqlsrv DB drivers with tests using PHP_INT_MAX

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3
    • Component/s: Database SQL/XMLDB
    • Labels:
    • Environment:
      MSSQL/SQLSRV unit tests
    • Database:
      Microsoft SQL
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Although highly improvable in real use... it seems that both the MSSQL and SQLSRV drivers are exposed to overflow problems when PHP_INT_MAX is used in limit tests.

      This is caused by this happening:

      $fetch = $limitfrom + $limitnum;

      So if both exist and they are bigger than PHP_INT_MAX, overflow => error happens.

      Fix is really parallel to the one applied @ MDL-26844 for PostgreSQL.

      Working on it. Ciao

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Pull requested @ PULL-510

            Resolving...ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Pull requested @ PULL-510 Resolving...ciao
            Hide
            tsala Helen Foster added a comment -

            Thanks Eloy

            Show
            tsala Helen Foster added a comment - Thanks Eloy

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/May/11