cgptlib: cast 32bit to 64bit before multiplication
authorPatrick Georgi <pgeorgi@google.com>
Tue, 2 Aug 2016 15:07:58 +0000 (17:07 +0200)
committerchrome-bot <chrome-bot@chromium.org>
Wed, 3 Aug 2016 14:06:32 +0000 (07:06 -0700)
commit46b77fb2f04941c869c3a98cd17e9209c36b2917
tree85f9186209e40dfb941e76b051508978ea3e6be5
parent16cacfa043c6153843873467ad4fc510b9fbcf44
cgptlib: cast 32bit to 64bit before multiplication

Coverity noted that multiplying two 32bit values happens in 32bit, while
the result is to be stored in an uint64_t.

BUG=none
BRANCH=none
TEST=none

Found-by: Coverity Scan #1353032, #1353033, 1353034
Change-Id: I8d0c5fe4feee066a81e8904c525dc836dd7a4fc6
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/365391
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
firmware/lib/gpt_misc.c