The routine to check file size larger than partitione is introducetd,
but it only checks partition size with 32 bit variable, so partition
larger than 4GB is not properly checked. So this patch fixes to
check partition size with 64 bit for more than 4GB partition.
Change-Id: If22c12e9d0678ea571ca3c382b46f5ae93036025
Fixes: cecbd73e488f ("tizen: thordown: fix to check larger file size than partition size")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
ret = rsp->ack;
}
- if (thor_file_size > part_info.size * part_info.blksz) {
+ if ((uint64_t)thor_file_size >
+ (uint64_t)part_info.size * (uint64_t)part_info.blksz) {
thor_debug("Too large binary\n");
rsp->ack = -EFBIG;
ret = rsp->ack;