summaryrefslogtreecommitdiff
path: root/thirdparty/minizip/patches/unbreak-gentoo.patch
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-03-31 14:14:05 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-03-31 15:19:11 +0200
commit420d0d50bcdc47c793157c2f1e143136eafa6500 (patch)
tree375213d3f3b14f97cb4dd8c8d9ccb4e54ca80105 /thirdparty/minizip/patches/unbreak-gentoo.patch
parenta647fb3e623c8e5c14427c2631ee61f132951709 (diff)
zlib/minizip: Update to version 1.2.12
Security update, fixes CVE-2018-25032 in zlib. Preliminary assessment doesn't show Godot as affected since we don't seem to call `deflate` with the problematic parameters, but the extent of the vulnerability is not fully clear upstream yet.
Diffstat (limited to 'thirdparty/minizip/patches/unbreak-gentoo.patch')
-rw-r--r--thirdparty/minizip/patches/unbreak-gentoo.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/thirdparty/minizip/patches/unbreak-gentoo.patch b/thirdparty/minizip/patches/unbreak-gentoo.patch
new file mode 100644
index 0000000000..9292e32ac6
--- /dev/null
+++ b/thirdparty/minizip/patches/unbreak-gentoo.patch
@@ -0,0 +1,27 @@
+diff --git a/thirdparty/minizip/ioapi.h b/thirdparty/minizip/ioapi.h
+index f25ab6464..6043d34ce 100644
+--- a/thirdparty/minizip/ioapi.h
++++ b/thirdparty/minizip/ioapi.h
+@@ -44,6 +44,22 @@
+ #include <stdlib.h>
+ #include "zlib.h"
+
++/* GODOT start */
++/* Mighty Gentoo saves the day by breaking the API of their zlib.h,
++ * removing this definition of OF(args) for no practical reason
++ * worth breaking compatibility with all projects that embed minizip
++ * while trying not to diverge too much from upstream zlib.
++ * Cf. https://github.com/godotengine/godot/issues/10539
++ *
++ * "By and large, this is good open source behaviour, and fits with
++ * the gentoo _don't fuck with upstream's releases_ philosophy"
++ * -- Gentoo philosopher
++ */
++#ifndef OF /* function prototypes */
++ #define OF(args) args
++#endif
++/* GODOT end */
++
+ #if defined(USE_FILE32API)
+ #define fopen64 fopen
+ #define ftello64 ftell