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

Some error messages might report table names incorrectly on LLP64 platforms

    XMLWordPrintable

Details

    Description

      MDEV-25743 added some more use of the printf-style format "%.*s" that expects the length of a string as int and a pointer to the start of the string. Some calls were passing the return value of std::string::size() as the length parameter, although that length is size_t. On 64-bit platforms that follow the LLP64 convention (such as 64-bit Microsoft Windows), sizeof(int)<sizeof(size_t) and incorrect code could be emitted, at least in theory.

      I am not aware of any real issue due to this.

      Note: the sign mismatch (int is signed and size_t is unsigned) should not be an issue, because we assume that the target architecture uses 2’s complement arithmetics and that sizeof(int)>=4. Any strings that are being output should be much smaller than 2 gigabytes.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              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.