Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-220

Connection error occured: java.lang.IndexOutOfBoundsException

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 1.3.0
    • 1.3.2
    • Other
    • None
    • MariaDB 10.0.17

    Description

      An exception is thrown in PacketOutputStream.sendStream (see attached stacktrace for details)! The implementation of sendStream is faulty (line 169):

      while ((len = reader.read(buffer, 0, (int) readLength)) > 0)

      In my case, readLength == 36214! You cannot read more data than the buffer size and hence the exception (here reader is a StringReader)! The readLength parameter of reader.read should be replaced by something like that:

      reader.read(buffer, 0, buffer.length)

      Attachments

        Activity

          diego dupin Diego Dupin added a comment -

          Ok, the problem is clear, and will be corrected in a correction release quickly.

          diego dupin Diego Dupin added a comment - Ok, the problem is clear, and will be corrected in a correction release quickly.
          diego dupin Diego Dupin added a comment - Will be integrated to correction release 3.1.2 (urgent release). github commit : https://github.com/MariaDB/mariadb-connector-j/commit/71e319cb573b95d1924193789ac0aaa478a21854 travis tests : https://travis-ci.org/MariaDB/mariadb-connector-j/builds/92227580

          People

            diego dupin Diego Dupin
            cbourque Christian Bourque
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.