diff options
author | aap <aap@papnet.eu> | 2021-01-08 13:34:49 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2021-01-08 13:34:49 +0100 |
commit | 37a58a04f2895a37fd961ee6e3ff7df80d22f110 (patch) | |
tree | 3483ae7a0de117b9f34b0481368dfe3d13d12e0e /src/core/FileMgr.cpp | |
parent | first commit for LCS (diff) | |
download | re3-37a58a04f2895a37fd961ee6e3ff7df80d22f110.tar re3-37a58a04f2895a37fd961ee6e3ff7df80d22f110.tar.gz re3-37a58a04f2895a37fd961ee6e3ff7df80d22f110.tar.bz2 re3-37a58a04f2895a37fd961ee6e3ff7df80d22f110.tar.lz re3-37a58a04f2895a37fd961ee6e3ff7df80d22f110.tar.xz re3-37a58a04f2895a37fd961ee6e3ff7df80d22f110.tar.zst re3-37a58a04f2895a37fd961ee6e3ff7df80d22f110.zip |
Diffstat (limited to 'src/core/FileMgr.cpp')
-rw-r--r-- | src/core/FileMgr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/FileMgr.cpp b/src/core/FileMgr.cpp index 99923ddf..32aa4041 100644 --- a/src/core/FileMgr.cpp +++ b/src/core/FileMgr.cpp @@ -241,7 +241,7 @@ CFileMgr::SetDirMyDocuments(void) } ssize_t -CFileMgr::LoadFile(const char *file, uint8 *buf, int unused, const char *mode) +CFileMgr::LoadFile(const char *file, uint8 *buf, int maxlen, const char *mode) { int fd; ssize_t n, len; @@ -257,6 +257,7 @@ CFileMgr::LoadFile(const char *file, uint8 *buf, int unused, const char *mode) return -1; #endif len += n; + assert(len < maxlen); }while(n == 0x4000); buf[len] = 0; myfclose(fd); |