summaryrefslogtreecommitdiffstats
path: root/uploadprogress-arginfo.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-07-22 08:37:07 +0200
committerRemi Collet <remi@remirepo.net>2021-07-22 08:37:07 +0200
commite97ac117288d9dae7f36e375329c65994843509b (patch)
tree755980841e087343c7634acae19bd65c414cf790 /uploadprogress-arginfo.patch
parent74f43de67a7798997dd5973fc11e82205e1d1e7b (diff)
Fix segmentation fault in uploadprogress, patch from
https://github.com/php/pecl-php-uploadprogress/pull/8 Add arginfo to functions, patch from https://github.com/php/pecl-php-uploadprogress/pull/9
Diffstat (limited to 'uploadprogress-arginfo.patch')
-rw-r--r--uploadprogress-arginfo.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/uploadprogress-arginfo.patch b/uploadprogress-arginfo.patch
new file mode 100644
index 0000000..81cf86c
--- /dev/null
+++ b/uploadprogress-arginfo.patch
@@ -0,0 +1,40 @@
+From f14654d30953e4b699bf25a244923bbadc55f4f9 Mon Sep 17 00:00:00 2001
+From: Andy Postnikov <apostnikov@gmail.com>
+Date: Fri, 21 Aug 2020 07:06:27 +0300
+Subject: [PATCH 1/3] Add arginfo to functions
+
+---
+ uploadprogress.c | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/uploadprogress.c b/uploadprogress.c
+index 6f72a92..52b313d 100644
+--- a/uploadprogress.c
++++ b/uploadprogress.c
+@@ -29,10 +29,22 @@
+ #define TMPDIR "/tmp"
+ #endif
+
++/* {{{ argument information */
++ZEND_BEGIN_ARG_INFO_EX(arginfo_uploadprogress_get_info, 0, 0, 1)
++ ZEND_ARG_TYPE_INFO(0, identifier, IS_STRING, 0)
++ZEND_END_ARG_INFO()
++
++ZEND_BEGIN_ARG_INFO_EX(arginfo_uploadprogress_get_contents, 0, 0, 2)
++ ZEND_ARG_TYPE_INFO(0, identifier, IS_STRING, 0)
++ ZEND_ARG_TYPE_INFO(0, fieldname, IS_STRING, 0)
++ ZEND_ARG_TYPE_INFO(0, maxlen, IS_LONG, 1)
++ZEND_END_ARG_INFO()
++/* }}} */
++
+ /* {{{ uploadprogress_functions[] */
+ zend_function_entry uploadprogress_functions[] = {
+- PHP_FE(uploadprogress_get_info, NULL)
+- PHP_FE(uploadprogress_get_contents, NULL)
++ PHP_FE(uploadprogress_get_info, arginfo_uploadprogress_get_info)
++ PHP_FE(uploadprogress_get_contents, arginfo_uploadprogress_get_contents)
+ { NULL, NULL, NULL }
+ };
+ /* }}} */
+
+