tizen: thordown: fix to check larger file size than partition size
[profile/mobile/platform/kernel/u-boot-tm1.git] / property / thor_mode.c
index 4845b16..e277eba 100644 (file)
@@ -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);