summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-09-01 11:00:38 +0200
committerCaolán McNamara <caolanm@redhat.com>2021-09-16 10:47:53 +0200
commit54850fe48da0170e2a66ada4688771ae63a8eea8 (patch)
tree1ba78162527cb63047a11dfdec4e5bfb9e99d1dc
parentfix skia build with newer freetypes (diff)
downloadcore-54850fe48da0170e2a66ada4688771ae63a8eea8.tar.gz
core-54850fe48da0170e2a66ada4688771ae63a8eea8.zip
patch Skia to search only system32/ for libraries
LO on Windows defaults to Vulkan, and Skia tries to load the vulkan DLL, which may not be present on some systems. The library AFAICT should always be in a system directory, so restrict library searching to just there to avoid the possibility of DLL hijacking, just to be safe. Change-Id: I78ad3c7297e613c0316e82c5ff3c0110a02da337 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121437 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122135 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--external/skia/UnpackedTarball_skia.mk1
-rw-r--r--external/skia/windows-libraries-system32.patch.113
2 files changed, 14 insertions, 0 deletions
diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk
index 104b307f2d64..bd9694bae443 100644
--- a/external/skia/UnpackedTarball_skia.mk
+++ b/external/skia/UnpackedTarball_skia.mk
@@ -40,6 +40,7 @@ skia_patches := \
skia_sk_cpu_sse_level_0_by_default.patch.1 \
fix-warnings.patch.1 \
disable-freetype-colrv1.1 \
+ windows-libraries-system32.patch.1 \
$(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))
diff --git a/external/skia/windows-libraries-system32.patch.1 b/external/skia/windows-libraries-system32.patch.1
new file mode 100644
index 000000000000..45c0e35d1cfa
--- /dev/null
+++ b/external/skia/windows-libraries-system32.patch.1
@@ -0,0 +1,13 @@
+diff --git a/src/ports/SkOSLibrary_win.cpp b/src/ports/SkOSLibrary_win.cpp
+index d2dcbe0af6..c288bbf177 100644
+--- a/src/ports/SkOSLibrary_win.cpp
++++ b/src/ports/SkOSLibrary_win.cpp
+@@ -11,7 +11,7 @@
+ #include "src/ports/SkOSLibrary.h"
+
+ void* SkLoadDynamicLibrary(const char* libraryName) {
+- return LoadLibraryA(libraryName);
++ return LoadLibraryExA(libraryName, nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32);
+ }
+
+ void* SkGetProcedureAddress(void* library, const char* functionName) {