mkcsmapper: Fix UBSan signed shift error
usr.bin/mkcsmapper/yacc.y:466:18: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
This commit is contained in:
parent
d3a76c3824
commit
5433404b05
@ -463,7 +463,7 @@ set_src_zone(u_int32_t val)
|
||||
default:
|
||||
goto bad;
|
||||
}
|
||||
rowcol_mask = 1 << (rowcol_bits - 1);
|
||||
rowcol_mask = 1u << (rowcol_bits - 1);
|
||||
rowcol_mask |= rowcol_mask - 1;
|
||||
for (i = 0; i < rowcol_len; ++i) {
|
||||
p = &rowcol[i];
|
||||
|
Loading…
Reference in New Issue
Block a user