mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-02 19:52:03 +00:00
0cdaf73c08
Using strndup(3) instead of malloc(3) followed by strncpy(3) simplifies the code and pleases GCC: In file included from /usr/include/string.h:535, from context.c:2: In function ‘strncpy’, inlined from ‘context_new’ at context.c:74:3: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: error: ‘__builtin_strncpy’ destination unchanged after copying no bytes [-Werror=stringop-truncation] 95 | return __builtin___strncpy_chk (__dest, __src, __len, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 96 | __glibc_objsize (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: James Carter <jwcart2@gmail.com> |
||
---|---|---|
.. | ||
include | ||
man | ||
src | ||
utils | ||
LICENSE | ||
Makefile | ||
VERSION |