aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorAlex Hung <[email protected]>2024-06-05 12:37:18 -0600
committerAlex Deucher <[email protected]>2024-06-14 16:18:55 -0400
commit143818fae047fdda55d06651e4d7ab9dc7afe669 (patch)
tree32309dcac2518ceae0c0b0da87424225af2ce0d5 /lib/test_fortify/write_overflow-strncpy-src.c
parent0057b36ac2be0f573048acda52e641e0502a9ff3 (diff)
drm/amd/display: Explicitly extend unsigned 16 bit to 64 bit
Coverity reports sign extention defects as below: Suspicious implicit sign extension: mode->htotal with type u16 ... to int (32 bits, signed), then sign-extended to type unsigned long (64 bits, unsigned). If mode->htotal * mode->vtotal is greater than 0x7FFFFFFF, the upper bits of the result will all be 1. Cast it to unsigned long to avoid possible overflow. This fixes 4 SIGN_EXTENSION issues reported by Coverity. Reviewed-by: Harry Wentland <[email protected]> Acked-by: Hamza Mahfooz <[email protected]> Signed-off-by: Alex Hung <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions