summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorKees Bakker <kees@ijzerbout.nl>2024-10-17 21:54:47 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-11-10 08:04:10 +0100
commite27cd6791de6eb68a123107586df982e7b51bbae (patch)
tree81c0264cf86f5e1d18f2d0a3a7b3e23577da3afa /drivers/gpu/drm/amd/amdgpu
parent73453164229ea3a27cd9d57b2886aeb07b775c6d (diff)
staging: gpib: avoid unintended sign extension
The code was basically like this (assuming size_t can be u64) var_u64 |= var_u8 << 24 var_u8 is first promoted to i32 and then the shift is done. Next, it is promoted to u64 by first signextending to 64 bits. This is very unlikely what was intended. So now it is first forced to u32. var_u64 |= (u32)var_u8 << 24 This was detected by Coverity, CID 1600792. Fixes: 4c41fe886a56 ("staging: gpib: Add Agilent/Keysight 82357x USB GPIB driver") Signed-off-by: Kees Bakker <kees@ijzerbout.nl> Link: https://lore.kernel.org/r/20241108201207.1194F18DDF5@bout3.ijzerbout.nl Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
0 files changed, 0 insertions, 0 deletions