Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/elfmz/far2l.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelfmz <fenix1905@tut.by>2020-10-18 03:27:05 +0300
committerelfmz <fenix1905@tut.by>2020-10-18 03:27:05 +0300
commitbe63b3c68054a1ca29d3ae25c33413709ef72701 (patch)
treea25e8cfaeb5491d04dffe491aa3d38a94a2069aa
parentc93d6f503062eff1424e0e97e16088133f9a1a97 (diff)
fix crash
-rw-r--r--WinPort/src/APIStringCodepages.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/WinPort/src/APIStringCodepages.cpp b/WinPort/src/APIStringCodepages.cpp
index 53a161de..f6eac78b 100644
--- a/WinPort/src/APIStringCodepages.cpp
+++ b/WinPort/src/APIStringCodepages.cpp
@@ -228,6 +228,8 @@ template <class CODEUNIT_SRC, class CODEUNIT_DST>
memcpy(dst, &replacement_char, sizeof(CODEUNIT_DST));
src++;
dst+= sizeof(CODEUNIT_DST);
+ srclen-= sizeof(CODEUNIT_SRC);
+ dstlen-= sizeof(CODEUNIT_DST);
if (srclen < sizeof(CODEUNIT_SRC)) {
break;