]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib: avoid format truncation
authorChristian Göttsche <cgzones@googlemail.com>
Mon, 11 Dec 2023 16:53:28 +0000 (17:53 +0100)
committerSerge Hallyn <serge@hallyn.com>
Thu, 14 Dec 2023 13:40:40 +0000 (07:40 -0600)
commitd2e7edcd0048a5040c8e30f49572907aff98f311
treee9e15694dce3c5907922f33a9627f97d071f227c
parentce3a4ac7a3fdf7c83cedc63c9d04dc18c9e69f50
lib: avoid format truncation

    commonio.c: In function 'commonio_unlock':
    commonio.c:487:49: warning: '.lock' directive output may be truncated writing 5 bytes into a region of size between 1 and 1024 [-Wformat-truncation=]
      487 |                 snprintf (lock, sizeof lock, "%s.lock", db->filename);
          |                                                 ^~~~~
    commonio.c:487:17: note: 'snprintf' output between 6 and 1029 bytes into a destination of size 1024
      487 |                 snprintf (lock, sizeof lock, "%s.lock", db->filename);
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/commonio.c