]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
lscgroup: Fix strncpy() truncation warning
authorTom Hromatka <tom.hromatka@oracle.com>
Tue, 27 Apr 2021 17:06:26 +0000 (17:06 +0000)
committerTom Hromatka <tom.hromatka@oracle.com>
Tue, 27 Apr 2021 17:06:26 +0000 (17:06 +0000)
commit9ab3bbd8416909ee27374980f64656340409a438
tree8082ae5bd9edd5060fd11b1fa8e31e6fd5dec575
parentc81d5e2d95b713985aafa05b0c64b125d6c7dc06
lscgroup: Fix strncpy() truncation warning

Fix the following strncpy() string truncation warning:

In function ‘strncpy’,
    inlined from ‘display_controller_data’ at lscgroup.c:99:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound 4096 equals destination size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/tools/lscgroup.c