diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-09-01 11:00:38 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-09-28 17:11:14 +0200 |
commit | e911cfe7c75a18a8023008cd437a281f3bfd3254 (patch) | |
tree | c97949d9d8a0304223cbe72602969e30ec228de3 /external | |
parent | e14febcf8f70713ad30c768cfd1d775de6c30a2d (diff) |
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>
(cherry picked from commit e7d2edb025b0ded69742f5e21786061ffc9f70df)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122738
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/skia/UnpackedTarball_skia.mk | 3 | ||||
-rw-r--r-- | external/skia/windows-libraries-system32.patch.1 | 13 |
2 files changed, 15 insertions, 1 deletions
diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk index 319b33716a96..7e00f98a8dbb 100644 --- a/external/skia/UnpackedTarball_skia.mk +++ b/external/skia/UnpackedTarball_skia.mk @@ -36,7 +36,8 @@ skia_patches := \ c++20.patch.0 \ constexpr-debug-std-max.patch.1 \ swap-buffers-rect.patch.1 \ - ubsan.patch.0 + ubsan.patch.0 \ + 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) { |