diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index bbb05126..920ff121 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -310,6 +310,7 @@ patch_enable_all () enable_opengl32_glDebugMessageCallback="$1" enable_quartz_MediaSeeking_Positions="$1" enable_quartz_Silence_FIXMEs="$1" + enable_reg_Tests="$1" enable_riched20_Class_Tests="$1" enable_riched20_IText_Interface="$1" enable_secur32_Zero_Buffer_Length="$1" @@ -1177,6 +1178,9 @@ patch_enable () quartz-Silence_FIXMEs) enable_quartz_Silence_FIXMEs="$2" ;; + reg-Tests) + enable_reg_Tests="$2" + ;; riched20-Class_Tests) enable_riched20_Class_Tests="$2" ;; @@ -6912,6 +6916,18 @@ if test "$enable_quartz_Silence_FIXMEs" -eq 1; then ) >> "$patchlist" fi +# Patchset reg-Tests +# | +# | Modified files: +# | * programs/reg/tests/reg.c +# | +if test "$enable_reg_Tests" -eq 1; then + patch_apply reg-Tests/0001-reg-tests-Don-t-call-RegCloseKey-on-uninitialized-me.patch + ( + printf '%s\n' '+ { "Sebastian Lackner", "reg/tests: Don'\''t call RegCloseKey on uninitialized memory.", 1 },'; + ) >> "$patchlist" +fi + # Patchset riched20-Class_Tests # | # | Modified files: diff --git a/patches/reg-Tests/0001-reg-tests-Don-t-call-RegCloseKey-on-uninitialized-me.patch b/patches/reg-Tests/0001-reg-tests-Don-t-call-RegCloseKey-on-uninitialized-me.patch new file mode 100644 index 00000000..bcfc30c3 --- /dev/null +++ b/patches/reg-Tests/0001-reg-tests-Don-t-call-RegCloseKey-on-uninitialized-me.patch @@ -0,0 +1,25 @@ +From 0d627c069b85cfcf18429e349b6a4166bd646451 Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Sun, 9 Jul 2017 15:59:59 +0200 +Subject: reg/tests: Don't call RegCloseKey on uninitialized memory. + +--- + programs/reg/tests/reg.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/programs/reg/tests/reg.c b/programs/reg/tests/reg.c +index af092908cbc..941d3257c95 100644 +--- a/programs/reg/tests/reg.c ++++ b/programs/reg/tests/reg.c +@@ -793,7 +793,7 @@ static void test_import(void) + DWORD r, dword = 0x123, type, size; + char test1_reg[MAX_PATH], test2_reg[MAX_PATH], cmdline[MAX_PATH]; + char test_string[] = "Test string", buffer[24]; +- HKEY hkey, subkey; ++ HKEY hkey, subkey = NULL; + LONG err; + BYTE hex[8]; + +-- +2.13.1 +