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

safe_strcpy() includes an unnecessary conditional branch

    XMLWordPrintable

Details

    Description

      A code contribution introduced a wrapper safe_strcpy() for the standard library function strncpy(). This wrapper is checking whether the output was truncated even in cases where the caller does not care about it.

      I think that we need a separate function for those few occurrences where the caller cares about truncation.

      While I was investigating this, I noticed that the program client/mariadb-plugin is apparently not covered by the default test suites of our mtr tool.

      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.