From 7ec354558161d8fc10ec89dd4f8ab6e973b1350f Mon Sep 17 00:00:00 2001 From: DavidXanatos Date: Sat, 11 Dec 2021 20:50:04 +0100 Subject: [PATCH] utf fix --- CHANGELOG.md | 2 ++ Sandboxie/common/stream.c | 2 +- Sandboxie/core/dll/Win32.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 083a5980..dbf0fe4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### - fixed bug in GetVersionExW making "OverrideOsBuild=..." not working +- fixed issue with some utf8 charakters when usded in the ini file + ## [1.0.2 / 5.55.2] - 2021-12-08 diff --git a/Sandboxie/common/stream.c b/Sandboxie/common/stream.c index a6f085ad..92aa4645 100644 --- a/Sandboxie/common/stream.c +++ b/Sandboxie/common/stream.c @@ -499,7 +499,7 @@ NTSTATUS Stream_Read_Wchar( wchar_t lowShort = (wchar_t)(cur_byte & 0x3F); //Create the UTF-16 code unit, then increment the iterator - int unicode = (highShort << 8) | lowShort; + int unicode = (highShort << 6) | lowShort; //Check to make sure the "unicode" is in the range [0..D7FF] and [E000..FFFF]. if ((0 <= unicode && unicode <= 0xD7FF) || (0xE000 <= unicode && unicode <= 0xFFFF)) { diff --git a/Sandboxie/core/dll/Win32.c b/Sandboxie/core/dll/Win32.c index 90893805..43462f2c 100644 --- a/Sandboxie/core/dll/Win32.c +++ b/Sandboxie/core/dll/Win32.c @@ -151,7 +151,7 @@ _FX NTSTATUS SbieDll_WoW64SysCall(ULONG syscall, ULONG* args) extern HANDLE SbieApi_DeviceHandle; ULONG argc = (syscall >> 24); - syscall &= 0x00FFFFFF; + syscall &= 0xFFFF; ULONG64 stack[19]; for (ULONG i = 0; i < argc; i++)