aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorColin Ian King <[email protected]>2021-03-30 12:12:38 +0100
committerGreg Kroah-Hartman <[email protected]>2021-04-02 16:28:03 +0200
commit55022fdeace8e432f008787ce03703bdcc9c3ca9 (patch)
tree8b2df42f0964fcaf2d6c6bf80a32ce3c2020fff3 /tools/perf/scripts/python/export-to-sqlite.py
parenta28e824fb8270eda43fd0f65c2a5fdf33f55c5eb (diff)
nvmem: core: Fix unintentional sign extension issue
The shifting of the u8 integer buf[3] by 24 bits to the left will be promoted to a 32 bit signed int and then sign-extended to a u64. In the event that the top bit of buf[3] is set then all then all the upper 32 bits of the u64 end up as also being set because of the sign-extension. Fix this by casting buf[i] to a u64 before the shift. Fixes: a28e824fb827 ("nvmem: core: Add functions to make number reading easy") Reviewed-by: Douglas Anderson <[email protected]> Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Addresses-Coverity: ("Unintended sign extension") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions