iliaa Mon Sep 12 11:39:15 2005 EDT
Modified files: (Branch: PHP_5_1)
/php-src NEWS
/php-src/ext/pspell pspell.c
Log:
MFH: Fixed bug #34456 (Possible crash inside pspell extension).
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.57&r2=1.2027.2.58&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.57 php-src/NEWS:1.2027.2.58
--- php-src/NEWS:1.2027.2.57 Mon Sep 12 07:48:53 2005
+++ php-src/NEWS Mon Sep 12 11:39:12 2005
@@ -25,6 +25,7 @@
- Fixed "make test" to work for phpized extensions. (Hartmut, Jani)
- Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems.
(Andrey)
+- Fixed bug #34456 (Possible crash inside pspell extension). (Nuno)
- Fixed bug #34449 (ext/soap: XSD_ANYXML functionality not exposed). (Dmitry)
- Fixed bug #34420 (Possible crash inside curl_multi_remove_handle()). (Ilia)
- Fixed bug #34331 (php crashes when variables_order is empty). (Ilia)
http://cvs.php.net/diff.php/php-src/ext/pspell/pspell.c?r1=1.45&r2=1.45.2.1&ty=u
Index: php-src/ext/pspell/pspell.c
diff -u php-src/ext/pspell/pspell.c:1.45 php-src/ext/pspell/pspell.c:1.45.2.1
--- php-src/ext/pspell/pspell.c:1.45 Wed Aug 3 10:07:42 2005
+++ php-src/ext/pspell/pspell.c Mon Sep 12 11:39:14 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pspell.c,v 1.45 2005/08/03 14:07:42 sniper Exp $ */
+/* $Id: pspell.c,v 1.45.2.1 2005/09/12 15:39:14 iliaa Exp $ */
#define IS_EXT_MODULE
@@ -697,6 +697,7 @@
zval **sccin, **runtogether;
int argc;
+ PspellManager *manager;
PspellConfig *config;
argc = ZEND_NUM_ARGS();
@@ -705,12 +706,13 @@
}
convert_to_long_ex(sccin);
- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
- if(!config){
+ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(sccin), &type);
+ if(!manager){
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a
PSPELL config index", Z_LVAL_PP(sccin));
RETURN_FALSE;
}
+ config = pspell_manager_config(manager);
convert_to_boolean_ex(runtogether);
pspell_config_replace(config, "run-together", Z_LVAL_PP(runtogether) ?
"true" : "false");
@@ -726,6 +728,7 @@
zval **sccin, **mode;
int argc;
+ PspellManager *manager;
PspellConfig *config;
argc = ZEND_NUM_ARGS();
@@ -734,12 +737,13 @@
}
convert_to_long_ex(sccin);
- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
- if(!config){
+ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(sccin), &type);
+ if(!manager){
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a
PSPELL config index", Z_LVAL_PP(sccin));
RETURN_FALSE;
}
+ config = pspell_manager_config(manager);
convert_to_long_ex(mode);
/* First check what mode we want (how many suggestions) */
@@ -767,6 +771,7 @@
char ignore_str[PSPELL_LARGEST_WORD + 1];
long ignore = 0L;
+ PspellManager *manager;
PspellConfig *config;
argc = ZEND_NUM_ARGS();
@@ -775,12 +780,13 @@
}
convert_to_long_ex(sccin);
- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
- if(!config){
+ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(sccin), &type);
+ if(!manager){
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a
PSPELL config index", Z_LVAL_PP(sccin));
RETURN_FALSE;
}
+ config = pspell_manager_config(manager);
convert_to_long_ex(pignore);
ignore = Z_LVAL_PP(pignore);
@@ -810,6 +816,7 @@
int type;
zval **sccin, **value;
int argc;
+ PspellManager *manager;
PspellConfig *config;
argc = ZEND_NUM_ARGS();
@@ -818,12 +825,13 @@
}
convert_to_long_ex(sccin);
- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
- if (!config) {
+ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(sccin), &type);
+ if (!manager) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a
PSPELL config index", Z_LVAL_PP(sccin));
RETURN_FALSE;
}
+ config = pspell_manager_config(manager);
convert_to_string_ex(value);
if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(value), NULL,
CHECKUID_CHECK_FILE_AND_DIR))) {
@@ -871,6 +879,7 @@
zval **sccin, **repl;
int argc;
+ PspellManager *manager;
PspellConfig *config;
argc = ZEND_NUM_ARGS();
@@ -879,12 +888,13 @@
}
convert_to_long_ex(sccin);
- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
- if(!config){
+ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(sccin), &type);
+ if(!manager){
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a
PSPELL config index", Z_LVAL_PP(sccin));
RETURN_FALSE;
}
+ config = pspell_manager_config(manager);
pspell_config_replace(config, "save-repl", "true");
convert_to_string_ex(repl);
@@ -911,6 +921,7 @@
zval **sccin, **save;
int argc;
+ PspellManager *manager;
PspellConfig *config;
argc = ZEND_NUM_ARGS();
@@ -919,12 +930,13 @@
}
convert_to_long_ex(sccin);
- config = (PspellConfig *) zend_list_find(Z_LVAL_PP(sccin), &type);
- if(!config){
+ manager = (PspellManager *) zend_list_find(Z_LVAL_PP(sccin), &type);
+ if(!manager){
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a
PSPELL config index", Z_LVAL_PP(sccin));
RETURN_FALSE;
}
+ config = pspell_manager_config(manager);
convert_to_boolean_ex(save);
pspell_config_replace(config, "save-repl", Z_LVAL_PP(save) ? "true" :
"false");
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php