util/ecst: Fix sign issues for file size

Since we'll never have to deal with 2GB+ sized images, don't bother
with larger data types.

Found by Coverity Scan #203948

BUG=none
BRANCH=none
TEST=none

Change-Id: I95cb75d693b94444a87d2100a3f25ddae87a5faa
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1801207
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
This commit is contained in:
Patrick Georgi 2019-09-12 16:27:14 +02:00 committed by Commit Bot
parent bcd8b7cffb
commit f962b50c92
1 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ unsigned int fw_offset;
int is_ptr_merge;
unsigned int g_ram_start_address;
unsigned int g_ram_size;
unsigned int api_file_size_bytes;
int api_file_size_bytes;
int is_mrider15 = FALSE;
/* Chips information, RAM start address and RAM size. */
@ -2289,7 +2289,7 @@ unsigned int calc_api_csum_bin(void)
unsigned int i;
unsigned int calc_read_bytes;
unsigned int calc_num_of_bytes_to_read;
int calc_num_of_bytes_to_read;
unsigned int calc_curr_position;
unsigned int calc_fw_checksum_crc = 0;
unsigned char g_fw_array[BUFF_SIZE];