From 9e8243ee10e4688e9ccb8f7df5e3c8a6ee360202 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 17 Sep 2017 01:55:51 +0000 Subject: [PATCH] Eolite 3.77: fix system hand when try to copy file size bigger than RAM available git-svn-id: svn://kolibrios.org@6979 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/eolite/include/translations.h | 4 ++-- programs/cmm/lib/copyf.h | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/programs/cmm/eolite/include/translations.h b/programs/cmm/eolite/include/translations.h index 1a4aa99309..7ca07e4e3f 100644 --- a/programs/cmm/eolite/include/translations.h +++ b/programs/cmm/eolite/include/translations.h @@ -1,5 +1,5 @@ -#define TITLE "Eolite File Manager v3.76" -#define ABOUT_TITLE "EOLITE 3.76" +#define TITLE "Eolite File Manager v3.77" +#define ABOUT_TITLE "EOLITE 3.77" #ifdef LANG_RUS ?define T_FILE "” ©«" diff --git a/programs/cmm/lib/copyf.h b/programs/cmm/lib/copyf.h index 7e8747e1e3..d712356fd5 100644 --- a/programs/cmm/lib/copyf.h +++ b/programs/cmm/lib/copyf.h @@ -41,8 +41,12 @@ { debugln("Error: CopyFile->GetFileInfo"); } - else + else if (GetFreeRAM() < CopyFile_atr.sizelo) { + debugln("Error: CopyFile->File size is bigger than RAM avilable"); + error = 30; + } + else { cbuf = malloc(CopyFile_atr.sizelo); if (error = ReadFile(0, CopyFile_atr.sizelo, cbuf, copy_from3)) {