Uploaded image for project: 'FreeSWITCH'
  1. FreeSWITCH
  2. FS-11700

switch_core_sqldb.c raises 'stringop-truncation' error with GCC 8.3.0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.8.5
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      debian buster/sid
    • CPU Architecture:
      x86-64
    • Kernel:
      Linux
    • uname:
      Linux h 4.19.0-2-amd64 #1 SMP Debian 4.19.16-1 (2019-01-17) x86_64 GNU/Linux
    • Userland:
      GNU/Linux
    • Distribution:
      Debian
    • Distribution Version:
      Debian sid/unstable
    • lsb_release:
      Hide
      Distributor ID: Debian
      Description: Debian GNU/Linux buster/sid
      Release: unstable
      Codename: sid
      Show
      Distributor ID: Debian Description: Debian GNU/Linux buster/sid Release: unstable Codename: sid
    • Compiler:
      gcc
    • Compiler Version:
      gcc (Debian 8.3.0-2) 8.3.0
    • FreeSWITCH GIT Revision:
      7e6206325a82c07168c6cba4fe81e0502bd5a83f
    • GIT Master Revision hash::
      7e6206325a82c07168c6cba4fe81e0502bd5a83f
    • Target Version:

      Description

      gcc 8.3.0 complains of:

      src/switch_core_sqldb.c: In function ‘switch_cache_db_status’:
      src/switch_core_sqldb.c:3781:4: error: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its len
      gth [-Werror=stringop-truncation]
      strncpy(cleankey_str, dbh->name, strlen(dbh->name));
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mikej Mike Jerris
                Reporter:
                asiplas Andrew Siplas
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: