hholzgra Wed May 28 05:40:32 2003 EDT
Modified files:
/php4/ext/fdf fdf.c
Log:
@fdf crash with ZTS builds fixed (see Bug #14877)
Index: php4/ext/fdf/fdf.c
diff -u php4/ext/fdf/fdf.c:1.79 php4/ext/fdf/fdf.c:1.80
--- php4/ext/fdf/fdf.c:1.79 Wed May 21 13:04:08 2003
+++ php4/ext/fdf/fdf.c Wed May 28 05:40:32 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fdf.c,v 1.79 2003/05/21 17:04:08 iliaa Exp $ */
+/* $Id: fdf.c,v 1.80 2003/05/28 09:40:32 hholzgra Exp $ */
/* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from
http://beta1.adobe.com/ada/acrosdk/forms.html. */
@@ -125,10 +125,19 @@
fdf_post_handler
};
+static void php_fdf_init_globals(zend_fdf_globals *fdf_globals)
+{
+ memset(fdf_globals, 0, sizeof(*fdf_globals));
+}
+
+
+
/* {{{ PHP_MINIT_FUNCTION
*/
PHP_MINIT_FUNCTION(fdf)
{
+ ZEND_INIT_MODULE_GLOBALS(fdf, php_fdf_init_globals, NULL);
+
le_fdf = zend_register_list_destructors_ex(phpi_FDFClose, NULL, "fdf",
module_number);
/* add handler for Acrobat FDF form post requests */
@@ -160,6 +169,7 @@
REGISTER_LONG_CONSTANT("FDFUp", FDFUp, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFFormat", FDFFormat, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFValidate", FDFValidate, CONST_CS |
CONST_PERSISTENT);
+
REGISTER_LONG_CONSTANT("FDFKeystroke", FDFKeystroke, CONST_CS |
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFCalculate", FDFCalculate, CONST_CS |
CONST_PERSISTENT);
@@ -167,7 +177,7 @@
REGISTER_LONG_CONSTANT("FDFNormalAP", 1, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFRolloverAP", 2, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FDFDownAP", 3, CONST_CS | CONST_PERSISTENT);
-
+
#ifdef PHP_WIN32
return SUCCESS;
#else
@@ -179,6 +189,7 @@
/* {{{ RINIT */
PHP_RINIT_FUNCTION(fdf)
{
+ FDF_G(error) = FDFErcOK;
return SUCCESS;
}
/* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php