setools/libqpol
Laurent Bigonville e41adf0164 Fix build failure with GCC 7 due to possible truncation of snprintf output
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>
2017-09-26 16:36:59 +02:00
..
include/qpol libqpol: fix typos in documentation comments 2016-05-04 23:14:27 +02:00
avrule_query.c Change extended avrules to be more similar to normal avrules 2016-03-21 10:57:21 -04:00
bool_query.c Cast the 2nd parameter of hashtab_search to hashtab_key_t 2014-11-02 13:02:58 -05:00
bounds_query.c policyrep: add typebounds rules 2016-02-05 13:53:30 -05:00
class_perm_query.c Implement CommonTest and ObjClassTest. 2015-04-23 11:04:37 -04:00
cond_query.c Remove unused-by-set variables 2014-11-02 13:02:58 -05:00
config.h Remove bzip2 dependency. 2016-04-22 13:48:39 -04:00
constraint_query.c Remove unused-by-set variables 2014-11-02 13:02:58 -05:00
context_query.c Fix qpol_context_get_range() not to segfault on MLS-disabled policy. 2015-03-15 12:37:24 -04:00
default_object_query.c Fixed -Werror=unused-but-set-variable in libqpol/default_object_query.c 2015-01-23 15:23:32 +01:00
expand.c Import libqpol from setools3. 2014-10-24 21:00:24 -04:00
expand.h Import libqpol from setools3. 2014-10-24 21:00:24 -04:00
fs_use_query.c Import libqpol from setools3. 2014-10-24 21:00:24 -04:00
ftrule_query.c Ftrules hashtab (#164) 2017-01-23 18:27:22 -05:00
genfscon_query.c Fix typo in variable name in qpol_policy_get_genfscon_by_name 2014-11-02 13:02:58 -05:00
isid_query.c Implement InitialSIDTest. 2015-04-24 08:56:56 -04:00
iterator_internal.h Change extended avrules to be more similar to normal avrules 2016-03-21 10:57:21 -04:00
iterator.c Change extended avrules to be more similar to normal avrules 2016-03-21 10:57:21 -04:00
mls_query.c Thoroughly test MLS representations. 2015-04-09 14:27:51 -04:00
mlsrule_query.c Ftrules hashtab (#164) 2017-01-23 18:27:22 -05:00
module_compiler.c symtab_datum is only 32 bits so casting triggers increase alignment warning, cast to void first to avoid that 2016-04-22 09:16:30 -04:00
module_compiler.h setools-V4: libqpol policy V30 updates (xen/xperm statements) 2016-03-21 10:56:37 -04:00
module.c Fix build error. 2016-04-22 14:46:55 -04:00
netifcon_query.c Import libqpol from setools3. 2014-10-24 21:00:24 -04:00
nodecon_query.c Import libqpol from setools3. 2014-10-24 21:00:24 -04:00
permissive_query.c Import libqpol from setools3. 2014-10-24 21:00:24 -04:00
polcap_query.c Import libqpol from setools3. 2014-10-24 21:00:24 -04:00
policy_define.c Ftrules hashtab (#164) 2017-01-23 18:27:22 -05:00
policy_define.h Ftrules hashtab (#164) 2017-01-23 18:27:22 -05:00
policy_extend.c Fix build failure with GCC 7 due to possible truncation of snprintf output 2017-09-26 16:36:59 +02:00
policy_parse.y setools-V4: libqpol policy V30 updates (xen/xperm statements) 2016-03-21 10:56:37 -04:00
policy_scan.l Reduce diff size between files copied from checkpolicy and libqpol. 2016-03-28 16:34:35 -04:00
policy.c bswap_* macros are defined in byteswap.h 2017-08-10 08:23:47 +02:00
portcon_query.c Import libqpol from setools3. 2014-10-24 21:00:24 -04:00
qpol_internal.h libqpol: Remove unused syntactic rule functions. 2016-05-20 10:31:18 -04:00
queue.c setools-V4: libqpol policy V30 updates (xen/xperm statements) 2016-03-21 10:56:37 -04:00
queue.h setools-V4: libqpol policy V30 updates (xen/xperm statements) 2016-03-21 10:56:37 -04:00
rbacrule_query.c Import libqpol from setools3. 2014-10-24 21:00:24 -04:00
role_query.c Cast the 2nd parameter of hashtab_search to hashtab_key_t 2014-11-02 13:02:58 -05:00
terule_query.c Remove unused-by-set variables 2014-11-02 13:02:58 -05:00
type_query.c Cast the 2nd parameter of hashtab_search to hashtab_key_t 2014-11-02 13:02:58 -05:00
user_query.c Cast the 2nd parameter of hashtab_search to hashtab_key_t 2014-11-02 13:02:58 -05:00
xen_query.c use c99 type for uint64_t 2016-04-22 09:16:30 -04:00