diff options
author | Jani Nikula <[email protected]> | 2022-05-18 14:33:14 +0300 |
---|---|---|
committer | Jani Nikula <[email protected]> | 2022-05-19 12:50:29 +0300 |
commit | 416e07a84f6ed883e0abd68c2fb868c80eea887b (patch) | |
tree | 057a7670985fbf3a014ee88c3c900939199be0b7 /lib/test_fortify/write_overflow-strlcpy-src.c | |
parent | 183f815d426b22c4424958403b096aebf3b060ca (diff) |
drm/i915/reg: fix undefined behavior due to shift overflowing the constant
Use REG_GENMASK() and REG_FIELD_PREP() to avoid errors due to
-fsanitize=shift.
References: https://lore.kernel.org/r/[email protected]
Reported-by: Borislav Petkov <[email protected]>
Reported-by: Ruiqi GONG <[email protected]>
Cc: Randy Dunlap <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 230fb39ff7e07bd0324c87acf08dd2c9b0bbcea8)
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions