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

safe_strcpy() includes an unnecessary conditional branch

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

            marko Marko Mäkelä created issue -
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Vicențiu Ciorbaru [ cvicentiu ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            marko Marko Mäkelä made changes -
            Fix Version/s 11.5.2 [ 29838 ]
            Fix Version/s 11.6.1 [ 29847 ]
            Fix Version/s 11.4.3 [ 29837 ]
            Fix Version/s 11.2.5 [ 29836 ]
            Fix Version/s 11.1.6 [ 29835 ]
            Fix Version/s 10.11.9 [ 29834 ]
            Fix Version/s 10.6.19 [ 29833 ]
            Fix Version/s 10.5.26 [ 29832 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 11.4 [ 29301 ]
            Assignee Vicențiu Ciorbaru [ cvicentiu ] Marko Mäkelä [ marko ]
            Resolution Fixed [ 1 ]
            Status In Review [ 10002 ] Closed [ 6 ]
            marko Marko Mäkelä made changes -

            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.