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

Validate length-encoded integers fit a non-negative int before use as a length

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Fixed
    • None
    • 3.5.10
    • Other
    • None

    Description

      Java cannot support array/List with size bigger than int max value (not unsigned int max value)
      ReadableByteBuf.readIntLengthEncodedNotNull() decodes the 8-byte (0xfe) form with return (int) readLong(), a silent 64→32 bit narrowing with no range check.

      Goal is to throw a proper error when that occurs.

      thanks fg0x0 for reporting

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.