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

Use memory safe snprintf() in client

    XMLWordPrintable

Details

    Description

      Replace sprintf(buf, ...) with snprintf(buf, sizeof(buf), ...),
      where buf is allocated with a size known at compile time.

      This makes sure we are not writing outside array/string bounds which will
      lead to undefined behaviour. In case the code is trying to write outside bounds - safe version of functions simply cut the string messages so we process this
      gracefully.

      Pull request: https://github.com/MariaDB/server/pull/2432

      Attachments

        Issue Links

          Activity

            People

              svoj Sergey Vojtovich
              svoj Sergey Vojtovich
              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.