From cecbd73e488f709ca1d6889147890a59a8291ab2 Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Thu, 6 Apr 2017 10:06:13 +0900 Subject: [PATCH 1/1] 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 --- property/thor_mode.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.7.4