mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-24 23:12:05 +00:00
checkpolicy: avoid implicit conversion
Avoid implicit conversions from signed to unsigned values, found by UB sanitizers, by using unsigned values in the first place. dismod.c:92:42: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
This commit is contained in:
parent
16d7dde41c
commit
c7c582a0ef
@ -89,7 +89,7 @@ static void render_access_bitmap(ebitmap_t * map, uint32_t class,
|
||||
fprintf(fp, "{");
|
||||
for (i = ebitmap_startbit(map); i < ebitmap_length(map); i++) {
|
||||
if (ebitmap_get_bit(map, i)) {
|
||||
perm = sepol_av_to_string(p, class, 1 << i);
|
||||
perm = sepol_av_to_string(p, class, UINT32_C(1) << i);
|
||||
if (perm)
|
||||
fprintf(fp, " %s", perm);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user