From cb5043490a24568ec21680151b8610743bc65206 Mon Sep 17 00:00:00 2001 From: DavidXanatos Date: Wed, 28 Dec 2022 18:53:25 +0100 Subject: [PATCH] 1.6.3a --- CHANGELOG.md | 3 ++- Sandboxie/core/drv/conf.c | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45942042..7828a904 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - fixed issue with auto delete sandbox on SandMan startup [#2555](https://github.com/sandboxie-plus/Sandboxie/issues/2555) - fixed issue with Windows 11 context menu when SandMan was not already running [#2284](https://github.com/sandboxie-plus/Sandboxie/issues/2284) - +- fixed issue with the display about cmbDefault [#2560](https://github.com/sandboxie-plus/Sandboxie/pull/2560) (okrc) +- fixed issuw with templates.ini loading on first start [#2574](https://github.com/sandboxie-plus/Sandboxie/issues/2574) diff --git a/Sandboxie/core/drv/conf.c b/Sandboxie/core/drv/conf.c index c138ac8e..722ca538 100644 --- a/Sandboxie/core/drv/conf.c +++ b/Sandboxie/core/drv/conf.c @@ -204,7 +204,7 @@ _FX NTSTATUS Conf_Read(ULONG session_id) ULONG path_len; WCHAR *path = NULL; BOOLEAN path_home; - STREAM *stream; + STREAM *stream = NULL; POOL *pool; // @@ -247,6 +247,7 @@ _FX NTSTATUS Conf_Read(ULONG session_id) status == STATUS_OBJECT_PATH_NOT_FOUND) { Log_Msg_Session(MSG_CONF_NO_FILE, NULL, NULL, session_id); + status = STATUS_SUCCESS; // we need to continue and load the Templates.ini with the defaults } else { wcscpy(linenum_str, L"(none)"); Log_Status_Ex_Session( @@ -281,6 +282,8 @@ _FX NTSTATUS Conf_Read(ULONG session_id) data.home = path_home; data.use_count = 0; + if (stream) { + status = Stream_Read_BOM(stream, &data.encoding); linenum = 1; @@ -288,9 +291,10 @@ _FX NTSTATUS Conf_Read(ULONG session_id) status = Conf_Read_Sections(stream, &data, &linenum); if (status == STATUS_END_OF_FILE) status = STATUS_SUCCESS; + } } - Stream_Close(stream); + if (stream) Stream_Close(stream); // // read (Home Path)\Templates.ini