https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0461de33c5de3fee70a00…
commit 0461de33c5de3fee70a004b2f9c9e03ca70cfc67
Author: Kyle Katarn <contact(a)kcsoftwares.com>
AuthorDate: Tue May 5 10:44:45 2020 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Tue May 5 11:44:45 2020 +0300
[REGEDIT] Fix HeapFree() on the wrong variable (#2736)
- When exporting registry keys (to .reg files) some variables from the heap are not free'd while the debug log indicates "HEAP: Trying to free an invalid address".
- This is due to the export_registry_key() function that calls
HeapFree() for reg_key_name. But this variable is an argument provided by the caller, which is always a statically defined array of WCHAR.
- Meanwhile reg_key_name_buf is never free'd and cause a memory leak each time the function gets called.
---
base/applications/regedit/regproc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/base/applications/regedit/regproc.c b/base/applications/regedit/regproc.c
index c17221df5ae..41ac7c6be8b 100644
--- a/base/applications/regedit/regproc.c
+++ b/base/applications/regedit/regproc.c
@@ -1392,7 +1392,7 @@ BOOL export_registry_key(WCHAR *file_name, WCHAR *reg_key_name, DWORD format)
if (file) {
fclose(file);
}
- HeapFree(GetProcessHeap(), 0, reg_key_name);
+ HeapFree(GetProcessHeap(), 0, reg_key_name_buf);
HeapFree(GetProcessHeap(), 0, val_name_buf);
HeapFree(GetProcessHeap(), 0, val_buf);
HeapFree(GetProcessHeap(), 0, line_buf);
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5dfe3455db5d8c21a3261…
commit 5dfe3455db5d8c21a326178006ae8dab9c71fc4b
Author: Kyle Katarn <contact(a)kcsoftwares.com>
AuthorDate: Mon May 4 22:30:36 2020 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon May 4 23:30:36 2020 +0300
[ADVAPI32] Fix undue debug print in nominal case (#2734)
In current implementation, when regedit opens HKCR root key, an error is logged
err:(dll/win32/advapi32/reg/hkcr.c:964) Returning 259.
This is not correct as the code 259 is ERROR_NO_MORE_ITEMS which is the nominal return value when end of enumeration is reached.
---
dll/win32/advapi32/reg/hkcr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dll/win32/advapi32/reg/hkcr.c b/dll/win32/advapi32/reg/hkcr.c
index 2756685d5fb..7d714f48388 100644
--- a/dll/win32/advapi32/reg/hkcr.c
+++ b/dll/win32/advapi32/reg/hkcr.c
@@ -961,7 +961,8 @@ EnumHKCRValue(
if (ErrorCode != ERROR_SUCCESS)
{
/* Most likely ERROR_NO_MORE_ITEMS */
- ERR("Returning %d.\n", ErrorCode);
+ if (ErrorCode != ERROR_NO_MORE_ITEMS)
+ ERR("Returning %d.\n", ErrorCode);
goto Exit;
}
FallbackValueName[FallbackValueNameLen] = L'\0';
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=156b3bd0149a7caee67fa…
commit 156b3bd0149a7caee67faebcfb09c77157ac55b3
Author: Victor Perevertkin <victor.perevertkin(a)reactos.org>
AuthorDate: Sat Apr 25 03:14:44 2020 +0300
Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org>
CommitDate: Mon May 4 21:47:37 2020 +0300
[REACTOS] Drop support for Visual Studio below 2015
---
README.md | 2 +-
configure.cmd | 5 +----
sdk/cmake/msvc.cmake | 12 +++++-------
3 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/README.md b/README.md
index bf96c76dab8..a200f9a5dc1 100644
--- a/README.md
+++ b/README.md
@@ -53,7 +53,7 @@ The code of ReactOS is licensed under [GNU GPL 2.0](https://github.com/reactos/r
To build the system it is strongly advised to use the _ReactOS Build Environment (RosBE)._
Up-to-date versions for Windows and for Unix/GNU-Linux are available from our download page at: ["Build Environment"](https://reactos.org/wiki/Build_Environment).
-Alternatively one can use Microsoft Visual C++ (MSVC) version 2010+. Building with MSVC is covered here: ["Visual Studio or Microsoft Visual C++"](https://reactos.org/wiki/CMake#Visual_Studio_or_Microsoft_Visual_C.2B.2B).
+Alternatively one can use Microsoft Visual C++ (MSVC) version 2015+. Building with MSVC is covered here: ["Visual Studio or Microsoft Visual C++"](https://reactos.org/wiki/CMake#Visual_Studio_or_Microsoft_Visual_C.2B.2B).
### Binaries
diff --git a/configure.cmd b/configure.cmd
index c0fa3ac00d4..2d780760681 100755
--- a/configure.cmd
+++ b/configure.cmd
@@ -50,14 +50,11 @@ if defined ROS_ARCH (
cl 2>&1 | find "x86" > NUL && set ARCH=i386
cl 2>&1 | find "x64" > NUL && set ARCH=amd64
cl 2>&1 | find "ARM" > NUL && set ARCH=arm
- cl 2>&1 | find "16.00." > NUL && set VS_VERSION=10
- cl 2>&1 | find "17.00." > NUL && set VS_VERSION=11
- cl 2>&1 | find "18.00." > NUL && set VS_VERSION=12
cl 2>&1 | find "19.00." > NUL && set VS_VERSION=14
cl 2>&1 | findstr /R /c:"19\.1.\." > NUL && set VS_VERSION=15
cl 2>&1 | findstr /R /c:"19\.2.\." > NUL && set VS_VERSION=16
if not defined VS_VERSION (
- echo Error: Visual Studio version too old ^(before 10 ^(2010^)^) or version detection failed.
+ echo Error: Visual Studio version too old ^(before 14 ^(2015^)^) or version detection failed.
goto quit
)
set BUILD_ENVIRONMENT=VS
diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake
index ce526ed979f..01bbfee00e0 100644
--- a/sdk/cmake/msvc.cmake
+++ b/sdk/cmake/msvc.cmake
@@ -50,19 +50,17 @@ endif()
# HACK: for VS 11+ we need to explicitly disable SSE, which is off by
# default for older compilers. See CORE-6507
-if(MSVC_VERSION GREATER 1699 AND ARCH STREQUAL "i386")
+if(ARCH STREQUAL "i386")
add_compile_flags("/arch:IA32")
endif ()
# VS 12+ requires /FS when used in parallel compilations
-if(MSVC_VERSION GREATER 1799 AND NOT MSVC_IDE)
+if(NOT MSVC_IDE)
add_compile_flags("/FS")
endif ()
# VS14+ tries to use thread-safe initialization
-if(MSVC_VERSION GREATER 1899)
- add_compile_flags("/Zc:threadSafeInit-")
-endif ()
+add_compile_flags("/Zc:threadSafeInit-")
# HACK: Disable use of __CxxFrameHandler4 on VS 16.3+ (x64 only)
# See https://developercommunity.visualstudio.com/content/problem/746534/visual-c…
@@ -112,8 +110,8 @@ add_compile_flags("/wd4018")
add_compile_flags("/we4013 /we4020 /we4022 /we4028 /we4047 /we4098 /we4101 /we4113 /we4129 /we4133 /we4163 /we4229 /we4311 /we4312 /we4313 /we4477 /we4603 /we4700 /we4715 /we4716")
# - C4189: local variable initialized but not referenced
-# Not in Release mode and not with MSVC 2010
-if((NOT CMAKE_BUILD_TYPE STREQUAL "Release") AND (NOT MSVC_VERSION LESS 1700))
+# Not in Release mode
+if(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
add_compile_flags("/we4189")
endif()