From e97ac117288d9dae7f36e375329c65994843509b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 22 Jul 2021 08:37:07 +0200 Subject: 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 --- uploadprogress-arginfo.patch | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 uploadprogress-arginfo.patch (limited to 'uploadprogress-arginfo.patch') 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 +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 } + }; + /* }}} */ + + -- cgit