From 4b1682c0ae40c138091e1f5067c04ec88f26c26e Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Fri, 16 Jun 2017 15:56:06 +0900 Subject: [PATCH] tizen: thordown: fix to check partition size more than 4GB 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 --- property/thor_mode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/property/thor_mode.c b/property/thor_mode.c index e277eba..6e3a104 100644 --- a/property/thor_mode.c +++ b/property/thor_mode.c @@ -178,7 +178,8 @@ static long long int process_rqt_download(const struct rqt_box *rqt) 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; -- 2.7.4