[Libreoffice-commits] core.git: external/skia

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 1 14:43:52 UTC 2021


 external/skia/UnpackedTarball_skia.mk            |    1 +
 external/skia/windows-libraries-system32.patch.1 |   13 +++++++++++++
 2 files changed, 14 insertions(+)

New commits:
commit e7d2edb025b0ded69742f5e21786061ffc9f70df
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Wed Sep 1 11:00:38 2021 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Wed Sep 1 16:43:19 2021 +0200

    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 at collabora.com>

diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk
index 7cb688c8cfd8..f1b4cc74e324 100644
--- a/external/skia/UnpackedTarball_skia.mk
+++ b/external/skia/UnpackedTarball_skia.mk
@@ -36,6 +36,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) {


More information about the Libreoffice-commits mailing list