cvs: php4 / NEWS php.ini-dist /ext/pcre php_pcre.c /ext/standard assert.c basic_functions.c
| From: | Zeev Suraski | Date: | Tue, 12 Sep 2000 20:48:33 +0000 |
| Subject: | cvs: php4 / NEWS php.ini-dist /ext/pcre php_pcre.c /ext/standard assert.c basic_functions.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1738@lists.php.net to get a copy of this message | ||
zeev Tue Sep 12 13:48:33 2000 EDT
Modified files:
/php4 NEWS php.ini-dist
/php4/ext/pcre php_pcre.c
/php4/ext/standard assert.c basic_functions.c
Log:
- Made eval() and several other runtime-evaluated code portions report the
nature and location of errors more accurately (Stas)
Index: php4/NEWS
diff -u php4/NEWS:1.441 php4/NEWS:1.442
--- php4/NEWS:1.441 Tue Sep 12 06:19:37 2000
+++ php4/NEWS Tue Sep 12 13:48:32 2000
@@ -2,6 +2,8 @@
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2000, Version 4.0.3-dev
+- Made eval() and several other runtime-evaluated code portions report the
+ nature and location of errors more accurately (Stas)
- Added an optional parameter to wordwrap that cuts a string if the length of a
word is longer than the maximum allowed. (Derick)
- Added functions pg_put_line and pg_end_copy (Dirk Elmendorf)
@@ -344,7 +346,7 @@
(Patch by daniel.braun@ercom.fr)
- Added extension YAZ (dickmeiss).
- Fixed a crash bug triggered by certain cases of class redeclarations
- (Stanislav & Zeev, Zend Engine)
+ (Stas & Zeev, Zend Engine)
- Fixed min()/max() segfault. (Andrei)
- New module for reading EXIF header data from JPEG files. Most digital
cameras will embed all sorts of information about a picture inside the
Index: php4/php.ini-dist
diff -u php4/php.ini-dist:1.48 php4/php.ini-dist:1.49
--- php4/php.ini-dist:1.48 Sat Sep 9 08:02:14 2000
+++ php4/php.ini-dist Tue Sep 12 13:48:32 2000
@@ -185,7 +185,14 @@
;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
+<<<<<<< php.ini-dist
+track_vars = On ; enable the $HTTP_*_VARS[] arrays, where * is one of
+ ; ENV, POST, GET, COOKIE or SERVER.
+ ; This is the preferred way of accessing form variables,
+ ; and prevents common security bugs many developers tend to make.
+=======
; Note - track_vars is ALWAYS enabled as of PHP 4.0.3
+>>>>>>> 1.47
variables_order = "EGPCS" ; This directive describes the order in which PHP registers
; GET, POST, Cookie, Environment and Built-in variables (G, P,
; C, E & S respectively, often referred to as EGPCS or GPC).
Index: php4/ext/pcre/php_pcre.c
diff -u php4/ext/pcre/php_pcre.c:1.67 php4/ext/pcre/php_pcre.c:1.68
--- php4/ext/pcre/php_pcre.c:1.67 Fri Aug 25 06:51:07 2000
+++ php4/ext/pcre/php_pcre.c Tue Sep 12 13:48:33 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pcre.c,v 1.67 2000/08/25 13:51:07 andrei Exp $ */
+/* $Id: php_pcre.c,v 1.68 2000/09/12 20:48:33 zeev Exp $ */
/*
TODO:
@@ -544,6 +544,7 @@
int esc_match_len; /* Length of the quote-escaped match */
int result_len; /* Length of the result of the evaluation */
int backref; /* Current backref */
+ char *compiled_string_description;
CLS_FETCH();
ELS_FETCH();
@@ -578,11 +579,14 @@
}
}
+ compiled_string_description = zend_make_compiled_string_description("regexp code");
/* Run the code */
- if (zend_eval_string(code, &retval CLS_CC ELS_CC) == FAILURE) {
+ if (zend_eval_string(code, &retval, compiled_string_description CLS_CC ELS_CC) == FAILURE) {
+ efree(compiled_string_description);
zend_error(E_ERROR, "Failed evaluating code:\n%s\n", code);
/* zend_error() does not return in this case */
}
+ efree(compiled_string_description);
convert_to_string(&retval);
/* Save the return value and its length */
Index: php4/ext/standard/assert.c
diff -u php4/ext/standard/assert.c:1.24 php4/ext/standard/assert.c:1.25
--- php4/ext/standard/assert.c:1.24 Wed Sep 6 06:50:09 2000
+++ php4/ext/standard/assert.c Tue Sep 12 13:48:33 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: assert.c,v 1.24 2000/09/06 13:50:09 thies Exp $ */
+/* $Id: assert.c,v 1.25 2000/09/12 20:48:33 zeev Exp $ */
/* {{{ includes/startup/misc */
@@ -138,6 +138,7 @@
int val;
char *myeval = NULL;
char *cbfunc;
+ char *compiled_string_description;
CLS_FETCH();
ASSERTLS_FETCH();
@@ -160,10 +161,13 @@
EG(error_reporting) = 0;
}
- if (zend_eval_string(myeval, &retval CLS_CC ELS_CC) == FAILURE) {
+ compiled_string_description = zend_make_compiled_string_description("assert code");
+ if (zend_eval_string(myeval, &retval, compiled_string_description CLS_CC ELS_CC) == FAILURE)
{
+ efree(compiled_string_description);
zend_error(E_ERROR, "Failure evaluating code:\n%s\n", myeval);
/* zend_error() does not return in this case. */
}
+ efree(compiled_string_description);
if (ASSERT(quiet_eval)) {
EG(error_reporting) = old_error_reporting;
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.257 php4/ext/standard/basic_functions.c:1.258
--- php4/ext/standard/basic_functions.c:1.257 Tue Sep 12 12:00:21 2000
+++ php4/ext/standard/basic_functions.c Tue Sep 12 13:48:33 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.257 2000/09/12 19:00:21 danbeck Exp $ */
+/* $Id: basic_functions.c,v 1.258 2000/09/12 20:48:33 zeev Exp $ */
#include "php.h"
#include "php_main.h"
@@ -1691,6 +1691,7 @@
{
pval **expr;
zend_syntax_highlighter_ini syntax_highlighter_ini;
+ char *hicompiled_string_description;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &expr)==FAILURE) {
WRONG_PARAM_COUNT;
@@ -1699,10 +1700,14 @@
convert_to_string_ex(expr);
php_get_highlight_struct(&syntax_highlighter_ini);
+
+ hicompiled_string_description = zend_make_compiled_string_description("highlighted
code");
- if (highlight_string(*expr, &syntax_highlighter_ini)==FAILURE) {
+ if (highlight_string(*expr, &syntax_highlighter_ini, hicompiled_string_description)==FAILURE)
{
+ efree(hicompiled_string_description);
RETURN_FALSE;
}
+ efree(hicompiled_string_description);
RETURN_TRUE;
}
/* }}} */