mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-02 03:32:13 +00:00
5d3c4430ee
GCC 12 produces an array-bounds warning: In file included from ../include/sepol/policydb/context.h:23, from ../include/sepol/policydb/policydb.h:62, from ../cil/src/cil_binary.c:41: In function ‘mls_level_init’, inlined from ‘mls_level_destroy’ at ../include/sepol/policydb/mls_types.h:99:2, inlined from ‘mls_level_destroy’ at ../include/sepol/policydb/mls_types.h:92:20, inlined from ‘mls_range_destroy’ at ../include/sepol/policydb/mls_types.h:149:2, inlined from ‘cil_rangetransition_to_policydb’ at ../cil/src/cil_binary.c:3231:6: ../include/sepol/policydb/mls_types.h:89:9: error: ‘memset’ offset [0, 23] is out of the bounds [0, 0] [-Werror=array-bounds] 89 | memset(level, 0, sizeof(mls_level_t)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../include/sepol/policydb/mls_types.h:89:9: error: ‘memset’ offset [0, 23] is out of the bounds [0, 0] [-Werror=array-bounds] cc1: all warnings being treated as errors This is a false positive, by inspecting the code and compiling with -O3 and -flto. Closes: https://github.com/SELinuxProject/selinux/issues/339 Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: James Carter <jwcart2@gmail.com> |
||
---|---|---|
.. | ||
include/cil | ||
src | ||
test | ||
.gitignore |