summaryrefslogtreecommitdiffstats
path: root/458.patch
diff options
context:
space:
mode:
Diffstat (limited to '458.patch')
-rw-r--r--458.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/458.patch b/458.patch
new file mode 100644
index 0000000..45a2ae7
--- /dev/null
+++ b/458.patch
@@ -0,0 +1,37 @@
+From 46fd58be9c1291eb563fd13315de5eeae9107c75 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Mon, 20 Sep 2021 13:44:02 +0200
+Subject: [PATCH] Fix #457 ensure format is always lowercase
+
+---
+ imagick.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/imagick.c b/imagick.c
+index ac889118..ee725669 100644
+--- a/imagick.c
++++ b/imagick.c
+@@ -3388,6 +3388,7 @@ static zval *php_imagick_read_property(zend_object *object, zend_string *member,
+ if (format) {
+ retval = rv;
+ ZVAL_STRING(retval, format);
++ php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval));
+ IMAGICK_FREE_MAGICK_MEMORY(format);
+ } else {
+ retval = rv;
+@@ -3460,6 +3461,7 @@ static zval *php_imagick_read_property(zval *object, zval *member, int type, voi
+ if (format) {
+ retval = rv;
+ ZVAL_STRING(retval, format);
++ php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval));
+ IMAGICK_FREE_MAGICK_MEMORY(format);
+ } else {
+ retval = rv;
+@@ -3542,6 +3544,7 @@ static zval *php_imagick_read_property(zval *object, zval *member, int type, con
+
+ if (format) {
+ ZVAL_STRING(retval, format, 1);
++ php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval));
+ IMAGICK_FREE_MAGICK_MEMORY(format);
+ } else {
+ ZVAL_STRING(retval, "", 1);