Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-32568

my_read() may return -1 for errors but has unsigned (size_t) return type

    XMLWordPrintable

Details

    Description

      my_read() may return -1 in case of errors. However, because it’s return type is unsigned (size_t) it actually returns 18446744073709551615. Some functions that call my_read() either do not check the result at all or expect a signed result and check it as “if my_read() > 0”. This might lead to arithmetic overflows, allocations of huge memory buffers, or other unexpected behavior.

      Attachments

        Activity

          People

            lizardo Luis Eduardo Oliveira Lizardo
            lizardo Luis Eduardo Oliveira Lizardo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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