From: Seung-Woo Kim Date: Thu, 6 Apr 2017 01:06:13 +0000 (+0900) Subject: tizen: thordown: fix to check larger file size than partition size X-Git-Tag: submit/tizen/20170406.031953^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cecbd73e488f709ca1d6889147890a59a8291ab2;p=profile%2Fmobile%2Fplatform%2Fkernel%2Fu-boot-tm1.git tizen: thordown: fix to check larger file size than partition size If the file is larger than its mapped partition size, then it should be failed to thor command. So, this patch fixes to check requested file size. Change-Id: I87a3c825138b93ebba961227e47a8cf600de602d Signed-off-by: Seung-Woo Kim --- diff --git a/property/thor_mode.c b/property/thor_mode.c index 4845b16..e277eba 100644 --- a/property/thor_mode.c +++ b/property/thor_mode.c @@ -178,6 +178,12 @@ 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) { + thor_debug("Too large binary\n"); + rsp->ack = -EFBIG; + ret = rsp->ack; + } + break; case RQT_DL_FILE_START: send_rsp(rsp);