-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphp-zlib-for-getimagesize.patch
More file actions
36 lines (30 loc) · 1.17 KB
/
php-zlib-for-getimagesize.patch
File metadata and controls
36 lines (30 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
make compressed .swf parsing possible,
link core php with -lz for getimagesize()
see also http://bugs.php.net/bug.php?id=29611
upstream: https://github.com/php/php-src/pull/4681
--- php-8.2.0RC2/ext/standard/image.c~ 2022-09-14 12:42:49.000000000 +0300
+++ php-8.2.0RC2/ext/standard/image.c 2022-09-29 01:20:02.719689289 +0300
@@ -28,7 +28,7 @@
#endif
#include "php_image.h"
-#if defined(HAVE_ZLIB) && !defined(COMPILE_DL_ZLIB)
+#if defined(HAVE_ZLIB)
#include "zlib.h"
#endif
@@ -154,7 +154,7 @@ static unsigned long int php_swf_get_bit
}
/* }}} */
-#if defined(HAVE_ZLIB) && !defined(COMPILE_DL_ZLIB)
+#if defined(HAVE_ZLIB)
/* {{{ php_handle_swc */
static struct php_gfxinfo *php_handle_swc(php_stream * stream)
{
@@ -1501,7 +1501,7 @@ static void php_getimagesize_from_stream
break;
case IMAGE_FILETYPE_SWC:
/* TODO: with the new php_image_register_handler() APIs, this restriction could be solved */
-#if defined(HAVE_ZLIB) && !defined(COMPILE_DL_ZLIB)
+#if defined(HAVE_ZLIB)
result = php_handle_swc(stream);
#else
php_error_docref(NULL, E_NOTICE, "The image is a compressed SWF file, but you do not have a static version of the zlib extension enabled");