diff options
author | aarya <aarya.chaumal@gmail.com> | 2022-03-13 15:35:12 +0530 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2022-04-11 02:13:13 +0000 |
commit | 7273274e00b3e715cfe279f8eb935207388a3ee0 (patch) | |
tree | 8eab9072760e60b0161cf90e15c33ef3822a1a15 /util | |
parent | 950037a7243e3fd8e75d4f956e0a4a57717a1cff (diff) | |
download | flashrom-7273274e00b3e715cfe279f8eb935207388a3ee0.tar.gz flashrom-7273274e00b3e715cfe279f8eb935207388a3ee0.tar.bz2 flashrom-7273274e00b3e715cfe279f8eb935207388a3ee0.zip |
ich_descriptors.c: Ensure unsigned types >=0 on to prevent underflow
Unsigned types show undefined behaviour if they are subtracted by a
value greater than their own (mostly it wraps to the max value). Using
this value for left shifting could be even more dangerous.
Change-Id: I5921cc571f3dca5188ca1973dba6ececbcbe2f39
Signed-off-by: Aarya Chaumal <aarya.chaumal@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/62764
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Diffstat (limited to 'util')
0 files changed, 0 insertions, 0 deletions