mirror of
https://github.com/SELinuxProject/setools
synced 2025-02-19 05:27:03 +00:00
setools fails to build under GCC7 -Wformat -Werror with the following error: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wno-sign-compare -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ilibqpol -Ilibqpol/include -I/usr/include/python3.6m -c libqpol/policy_extend.c -o build/temp.linux-amd64-3.6/libqpol/policy_extend.o -Werror -Wextra -Waggregate-return -Wfloat-equal -Wformat -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-include-dirs -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wunknown-pragmas -Wwrite-strings -Wno-missing-field-initializers -Wno-unused-parameter -Wno-cast-qual -Wno-shadow -Wno-unreachable-code -fno-exceptions libqpol/policy_extend.c: In function 'policy_extend': libqpol/policy_extend.c:161:27: error: '%04zd' directive output may be truncated writing between 4 and 10 bytes into a region of size 5 [-Werror=format-truncation=] snprintf(buff, 9, "@ttr%04zd", i + 1); ^~~~~ libqpol/policy_extend.c:161:22: note: directive argument in the range [1, 4294967295] snprintf(buff, 9, "@ttr%04zd", i + 1); ^~~~~~~~~~~ Increase the size of the buffer to avoid collisions Closes: https://github.com/TresysTechnology/setools/issues/174 Signed-off-by: Laurent Bigonville <bigon@bigon.be> |
||
---|---|---|
.. | ||
include/qpol | ||
avrule_query.c | ||
bool_query.c | ||
bounds_query.c | ||
class_perm_query.c | ||
cond_query.c | ||
config.h | ||
constraint_query.c | ||
context_query.c | ||
default_object_query.c | ||
expand.c | ||
expand.h | ||
fs_use_query.c | ||
ftrule_query.c | ||
genfscon_query.c | ||
isid_query.c | ||
iterator_internal.h | ||
iterator.c | ||
mls_query.c | ||
mlsrule_query.c | ||
module_compiler.c | ||
module_compiler.h | ||
module.c | ||
netifcon_query.c | ||
nodecon_query.c | ||
permissive_query.c | ||
polcap_query.c | ||
policy_define.c | ||
policy_define.h | ||
policy_extend.c | ||
policy_parse.y | ||
policy_scan.l | ||
policy.c | ||
portcon_query.c | ||
qpol_internal.h | ||
queue.c | ||
queue.h | ||
rbacrule_query.c | ||
role_query.c | ||
terule_query.c | ||
type_query.c | ||
user_query.c | ||
xen_query.c |