[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Mon Jan 17 20:36:47 2005 EDT Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/diff.php/php-src/ChangeLog?r1=1.1867r2=1.1868ty=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.1867 php-src/ChangeLog:1.1868 --- php-src/ChangeLog:1.1867Sun Jan 16 20:40:52 2005 +++ php-src/ChangeLog Mon Jan 17 20:36:46 2005 @@ -1,3 +1,67 @@ +2005-01-17 Antony Dovgal [EMAIL PROTECTED] + +* ext/odbc/php_odbc.c: + fix weird DB2 issue: + DB2's SQLDataSources() returns _max available_ length of result string + instead of + _real_ length and that results in strings a-la \0 + +2005-01-17 Jani Taskinen [EMAIL PROTECTED] + +* (PHP_4_3) + NEWS + Zend/zend_language_scanner.l: + MFZE2: - Fixed bug #31444 (Memory leak in zend_language_scanner.c) + +* (PHP_5_0) + NEWS + ZendEngine2/zend_language_scanner.l: + MFH: - Fixed bug #31444 (Memory leak in zend_language_scanner.c) + +* ZendEngine2/zend_language_scanner.l: + - Fixed bug #31444 (Memory leak in zend_language_scanner.c) + +* (PHP_4_3) + ext/gd/gd.c + ext/gd/gd.c: + MFH: - Added some sanity checks by changing to the parameter parsing API + +* ext/gd/gd.c: + - Added some sanity checks by changing to the parameter parsing API + +2005-01-17 Christian Stocker [EMAIL PROTECTED] + +* (PHP_5_0) + ext/xsl/php_xsl.c + ext/xsl/php_xsl.h: + revert these 2 files... shouldn't have been comitted .. + +* ext/xsl/xsltprocessor.c: + fix protos (by Mehdi Achour ) + +2005-01-17 Antony Dovgal [EMAIL PROTECTED] + +* ext/odbc/php_odbc.c: + fix leak appearing when odbc_errormsg() got invalid resource + +2005-01-17 Joe Orton [EMAIL PROTECTED] + +* (PHP_4_3) + sapi/apache2handler/sapi_apache2.c + sapi/apache2handler/sapi_apache2.c: + MFH - Fixed bug #31519: Set r-status_line to SAPI-provided status-line. + +* sapi/apache2handler/sapi_apache2.c: + Fixed bug #31519: Set r-status_line to SAPI-provided status-line. + +2005-01-17 Stefan Esser [EMAIL PROTECTED] + +* ext/standard/var_unserializer.c + ext/standard/var_unserializer.c + ext/standard/var_unserializer.re + ext/standard/var_unserializer.re: + Fix compiler warning. + 2005-01-16 Stefan Esser [EMAIL PROTECTED] * (PHP_5_0) @@ -334,7 +398,7 @@ ext/standard/url_scanner_ex.c ext/standard/url_scanner_ex.h ext/standard/url_scanner_ex.re: - Missing $Id: ChangeLog,v 1.1867 2005/01/17 01:40:52 changelog Exp $ tag + Missing $Id: ChangeLog,v 1.1868 2005/01/18 01:36:46 changelog Exp $ tag * ext/standard/credits_ext.h ext/standard/credits_sapi.h:
Re: [PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard php_var.h var_unserializer.c var_unserializer.re
Hi, Stefan! On Sat, 15 Jan 2005 18:44:30 - Stefan Esser [EMAIL PROTECTED] wrote: The patch looks obviously wrong: +static inline void var_push_dtor(php_unserialize_data_t *var_hashx, zval **rval)+{ .. + var_push_dtor(var_hash, old_data); The last line should look like this: var_push_dtor(var_hash, old_data); But even with this fix I got segfault after serialize()/unserialize(). These two tests fail after your fix: ext/standard/tests/serialize/001.phpt ext/standard/tests/serialize/bug28325.phpt -- Wbr, Antony Dovgal aka tony2001 [EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard var_unserializer.c var_unserializer.re
sesser Mon Jan 17 06:45:09 2005 EDT Modified files: /php-src/ext/standard var_unserializer.c var_unserializer.re Log: Fix compiler warning. http://cvs.php.net/diff.php/php-src/ext/standard/var_unserializer.c?r1=1.48r2=1.49ty=u Index: php-src/ext/standard/var_unserializer.c diff -u php-src/ext/standard/var_unserializer.c:1.48 php-src/ext/standard/var_unserializer.c:1.49 --- php-src/ext/standard/var_unserializer.c:1.48Sat Jan 15 13:30:16 2005 +++ php-src/ext/standard/var_unserializer.c Mon Jan 17 06:45:09 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: var_unserializer.c,v 1.48 2005/01/15 18:30:16 sesser Exp $ */ +/* $Id: var_unserializer.c,v 1.49 2005/01/17 11:45:09 sesser Exp $ */ #include php.h #include ext/standard/php_var.h @@ -213,7 +213,7 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, int elements) { while (elements-- 0) { - zval *key, *data, *old_data; + zval *key, *data, **old_data; ALLOC_INIT_ZVAL(key); http://cvs.php.net/diff.php/php-src/ext/standard/var_unserializer.re?r1=1.37r2=1.38ty=u Index: php-src/ext/standard/var_unserializer.re diff -u php-src/ext/standard/var_unserializer.re:1.37 php-src/ext/standard/var_unserializer.re:1.38 --- php-src/ext/standard/var_unserializer.re:1.37 Sat Jan 15 13:30:16 2005 +++ php-src/ext/standard/var_unserializer.reMon Jan 17 06:45:09 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: var_unserializer.re,v 1.37 2005/01/15 18:30:16 sesser Exp $ */ +/* $Id: var_unserializer.re,v 1.38 2005/01/17 11:45:09 sesser Exp $ */ #include php.h #include ext/standard/php_var.h @@ -216,7 +216,7 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, int elements) { while (elements-- 0) { - zval *key, *data, *old_data; + zval *key, *data, **old_data; ALLOC_INIT_ZVAL(key); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard var_unserializer.c var_unserializer.re
sesser Mon Jan 17 06:46:12 2005 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/standard var_unserializer.c var_unserializer.re Log: Fix compiler warning. http://cvs.php.net/diff.php/php-src/ext/standard/var_unserializer.c?r1=1.18.4.15r2=1.18.4.16ty=u Index: php-src/ext/standard/var_unserializer.c diff -u php-src/ext/standard/var_unserializer.c:1.18.4.15 php-src/ext/standard/var_unserializer.c:1.18.4.16 --- php-src/ext/standard/var_unserializer.c:1.18.4.15 Sat Jan 15 13:44:29 2005 +++ php-src/ext/standard/var_unserializer.c Mon Jan 17 06:46:11 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: var_unserializer.c,v 1.18.4.15 2005/01/15 18:44:29 sesser Exp $ */ +/* $Id: var_unserializer.c,v 1.18.4.16 2005/01/17 11:46:11 sesser Exp $ */ #include php.h #include ext/standard/php_var.h @@ -152,10 +152,10 @@ -static inline int parse_iv2(const unsigned char *p, const unsigned char **q) +static inline long parse_iv2(const unsigned char *p, const unsigned char **q) { char cursor; - int result = 0; + long result = 0; int neg = 0; switch (*p) { @@ -180,7 +180,7 @@ return result; } -static inline int parse_iv(const unsigned char *p) +static inline long parse_iv(const unsigned char *p) { return parse_iv2(p, NULL); } @@ -213,7 +213,7 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, int elements) { while (elements-- 0) { - zval *key, *data, *old_data; + zval *key, *data, **old_data; ALLOC_INIT_ZVAL(key); @@ -279,7 +279,7 @@ static inline int object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *ce) { - int elements; + long elements; elements = parse_iv2((*p) + 2, p); @@ -621,7 +621,7 @@ yy37: #line 419 { - int elements = parse_iv(start + 2); + long elements = parse_iv(start + 2); *p = YYCURSOR; http://cvs.php.net/diff.php/php-src/ext/standard/var_unserializer.re?r1=1.11.4.9r2=1.11.4.10ty=u Index: php-src/ext/standard/var_unserializer.re diff -u php-src/ext/standard/var_unserializer.re:1.11.4.9 php-src/ext/standard/var_unserializer.re:1.11.4.10 --- php-src/ext/standard/var_unserializer.re:1.11.4.9 Sat Jan 15 13:44:29 2005 +++ php-src/ext/standard/var_unserializer.reMon Jan 17 06:46:11 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: var_unserializer.re,v 1.11.4.9 2005/01/15 18:44:29 sesser Exp $ */ +/* $Id: var_unserializer.re,v 1.11.4.10 2005/01/17 11:46:11 sesser Exp $ */ #include php.h #include ext/standard/php_var.h @@ -216,7 +216,7 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, int elements) { while (elements-- 0) { - zval *key, *data, *old_data; + zval *key, *data, **old_data; ALLOC_INIT_ZVAL(key); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard php_var.h var_unserializer.c var_unserializer.re
On Mon, 17 Jan 2005 12:36:22 +0100 Stefan Esser [EMAIL PROTECTED] wrote: Hi Antony, The patch looks obviously wrong: +static inline void var_push_dtor(php_unserialize_data_t *var_hashx, zval **rval)+{ .. + var_push_dtor(var_hash, old_data); The last line should look like this: var_push_dtor(var_hash, old_data); The type is wrong it should be zval **old_data; to fix the warning the rest of the patch is okay. Your fix segfaults because it is wrong. I got this after your last commit, where you've fixed compiler warnings. (gdb) r ext/standard/tests/serialize/001.php Starting program: /home/dev/php-src/sapi/cli/php ext/standard/tests/serialize/001.php __sleep called O:1:s:2:{s:1:a;s:5:hallo;s:1:c;s:5:world;} __wakeup called [Mon Jan 17 14:40:35 2005] Script: 'ext/standard/tests/serialize/001.php' --- /home/dev/php-src/ext/standard/var_unserializer.re(134) : Block 0x082CE104 status: Beginning: Overrun (magic=0x08232520, expected=0x7312F8DC) End: Unknown --- Program received signal SIGSEGV, Segmentation fault. 0x08176157 in _zval_ptr_dtor (zval_ptr=0x82ce124, __zend_filename=0x823bac0 /home/dev/php-src/Zend/zend_execute.h, __zend_lineno=127) at /home/dev/php-src/Zend/zend_execute_API.c:389 389 (*zval_ptr)-refcount--; (gdb) bt #0 0x08176157 in _zval_ptr_dtor (zval_ptr=0x82ce124, __zend_filename=0x823bac0 /home/dev/php-src/Zend/zend_execute.h, __zend_lineno=127) at /home/dev/php-src/Zend/zend_execute_API.c:389 #1 0x081ef532 in zend_ptr_stack_clear_multiple () at zend_execute.h:127 #2 0x081a6067 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfffd3d0) at zend_vm_execute.h:273 #3 0x081a85a7 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0xbfffd3d0) at zend_vm_execute.h:1534 #4 0x081a586f in execute (op_array=0x82dc234) at zend_vm_execute.h:78 #5 0x08182a23 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/dev/php-src/Zend/zend.c:1058 #6 0x081429a5 in php_execute_script (primary_file=0xb7e0) at /home/dev/php-src/main/main.c:1641 #7 0x081f2ab5 in main (argc=2, argv=0xb874) at /home/dev/php-src/sapi/cli/php_cli.c:944 #8 0x420157a4 in __libc_start_main () from /lib/tls/libc.so.6 -- Wbr, Antony Dovgal aka tony2001 [EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/apache2handler sapi_apache2.c
jorton Mon Jan 17 07:24:41 2005 EDT Modified files: /php-src/sapi/apache2handlersapi_apache2.c Log: Fixed bug #31519: Set r-status_line to SAPI-provided status-line. http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.50r2=1.51ty=u Index: php-src/sapi/apache2handler/sapi_apache2.c diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.50 php-src/sapi/apache2handler/sapi_apache2.c:1.51 --- php-src/sapi/apache2handler/sapi_apache2.c:1.50 Thu Dec 16 07:34:32 2004 +++ php-src/sapi/apache2handler/sapi_apache2.c Mon Jan 17 07:24:40 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: sapi_apache2.c,v 1.50 2004/12/16 12:34:32 sniper Exp $ */ +/* $Id: sapi_apache2.c,v 1.51 2005/01/17 12:24:40 jorton Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -121,9 +121,17 @@ php_apache_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) { php_struct *ctx = SG(server_context); + const char *sline = SG(sapi_headers).http_status_line; ctx-r-status = SG(sapi_headers).http_response_code; + /* httpd requires that r-status_line is set to the first digit of +* the status-code: */ + if (sline strlen(sline) 12 strncmp(sline, HTTP/1., 7) == 0 +sline[8] == ' ') { + ctx-r-status_line = apr_pstrdup(ctx-r-pool, sline + 9); + } + return SAPI_HEADER_SENT_SUCCESSFULLY; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard var_unserializer.c var_unserializer.re
sesser Mon Jan 17 07:28:11 2005 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/standard var_unserializer.c var_unserializer.re Log: MFH: 64bit fixes http://cvs.php.net/diff.php/php-src/ext/standard/var_unserializer.c?r1=1.18.4.16r2=1.18.4.17ty=u Index: php-src/ext/standard/var_unserializer.c diff -u php-src/ext/standard/var_unserializer.c:1.18.4.16 php-src/ext/standard/var_unserializer.c:1.18.4.17 --- php-src/ext/standard/var_unserializer.c:1.18.4.16 Mon Jan 17 06:46:11 2005 +++ php-src/ext/standard/var_unserializer.c Mon Jan 17 07:28:08 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: var_unserializer.c,v 1.18.4.16 2005/01/17 11:46:11 sesser Exp $ */ +/* $Id: var_unserializer.c,v 1.18.4.17 2005/01/17 12:28:08 sesser Exp $ */ #include php.h #include ext/standard/php_var.h @@ -279,7 +279,7 @@ static inline int object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *ce) { - long elements; + int elements; elements = parse_iv2((*p) + 2, p); @@ -621,7 +621,7 @@ yy37: #line 419 { - long elements = parse_iv(start + 2); + int elements = parse_iv(start + 2); *p = YYCURSOR; http://cvs.php.net/diff.php/php-src/ext/standard/var_unserializer.re?r1=1.11.4.10r2=1.11.4.11ty=u Index: php-src/ext/standard/var_unserializer.re diff -u php-src/ext/standard/var_unserializer.re:1.11.4.10 php-src/ext/standard/var_unserializer.re:1.11.4.11 --- php-src/ext/standard/var_unserializer.re:1.11.4.10 Mon Jan 17 06:46:11 2005 +++ php-src/ext/standard/var_unserializer.reMon Jan 17 07:28:08 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: var_unserializer.re,v 1.11.4.10 2005/01/17 11:46:11 sesser Exp $ */ +/* $Id: var_unserializer.re,v 1.11.4.11 2005/01/17 12:28:08 sesser Exp $ */ #include php.h #include ext/standard/php_var.h @@ -155,10 +155,10 @@ -static inline int parse_iv2(const unsigned char *p, const unsigned char **q) +static inline long parse_iv2(const unsigned char *p, const unsigned char **q) { char cursor; - int result = 0; + long result = 0; int neg = 0; switch (*p) { @@ -183,7 +183,7 @@ return result; } -static inline int parse_iv(const unsigned char *p) +static inline long parse_iv(const unsigned char *p) { return parse_iv2(p, NULL); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /sapi/apache2handler sapi_apache2.c
jorton Mon Jan 17 07:35:29 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/sapi/apache2handlersapi_apache2.c Log: MFH - Fixed bug #31519: Set r-status_line to SAPI-provided status-line. http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.40.2.5r2=1.40.2.6ty=u Index: php-src/sapi/apache2handler/sapi_apache2.c diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.40.2.5 php-src/sapi/apache2handler/sapi_apache2.c:1.40.2.6 --- php-src/sapi/apache2handler/sapi_apache2.c:1.40.2.5 Thu Dec 16 07:35:43 2004 +++ php-src/sapi/apache2handler/sapi_apache2.c Mon Jan 17 07:35:28 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: sapi_apache2.c,v 1.40.2.5 2004/12/16 12:35:43 sniper Exp $ */ +/* $Id: sapi_apache2.c,v 1.40.2.6 2005/01/17 12:35:28 jorton Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -121,9 +121,17 @@ php_apache_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) { php_struct *ctx = SG(server_context); + const char *sline = SG(sapi_headers).http_status_line; ctx-r-status = SG(sapi_headers).http_response_code; + /* httpd requires that r-status_line is set to the first digit of +* the status-code: */ + if (sline strlen(sline) 12 strncmp(sline, HTTP/1., 7) == 0 +sline[8] == ' ') { + ctx-r-status_line = apr_pstrdup(ctx-r-pool, sline + 9); + } + return SAPI_HEADER_SENT_SUCCESSFULLY; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /sapi/apache2handler sapi_apache2.c
jorton Mon Jan 17 07:36:44 2005 EDT Modified files: (Branch: PHP_4_3) /php-src/sapi/apache2handlersapi_apache2.c Log: MFH - Fixed bug #31519: Set r-status_line to SAPI-provided status-line. http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.1.2.37r2=1.1.2.38ty=u Index: php-src/sapi/apache2handler/sapi_apache2.c diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.37 php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.38 --- php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.37 Thu Dec 16 07:36:43 2004 +++ php-src/sapi/apache2handler/sapi_apache2.c Mon Jan 17 07:36:44 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: sapi_apache2.c,v 1.1.2.37 2004/12/16 12:36:43 sniper Exp $ */ +/* $Id: sapi_apache2.c,v 1.1.2.38 2005/01/17 12:36:44 jorton Exp $ */ #include fcntl.h @@ -119,9 +119,17 @@ php_apache_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) { php_struct *ctx = SG(server_context); + const char *sline = SG(sapi_headers).http_status_line; ctx-r-status = SG(sapi_headers).http_response_code; + /* httpd requires that r-status_line is set to the first digit of +* the status-code: */ + if (sline strlen(sline) 12 strncmp(sline, HTTP/1., 7) == 0 +sline[8] == ' ') { + ctx-r-status_line = apr_pstrdup(ctx-r-pool, sline + 9); + } + return SAPI_HEADER_SENT_SUCCESSFULLY; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/standard var_unserializer.c var_unserializer.re
sesser Mon Jan 17 07:13:35 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/standard var_unserializer.c var_unserializer.re Log: MFH: 64bit fix + compiler warning fix http://cvs.php.net/diff.php/php-src/ext/standard/var_unserializer.c?r1=1.38.2.6r2=1.38.2.7ty=u Index: php-src/ext/standard/var_unserializer.c diff -u php-src/ext/standard/var_unserializer.c:1.38.2.6 php-src/ext/standard/var_unserializer.c:1.38.2.7 --- php-src/ext/standard/var_unserializer.c:1.38.2.6Sun Jan 16 17:02:50 2005 +++ php-src/ext/standard/var_unserializer.c Mon Jan 17 07:13:32 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: var_unserializer.c,v 1.38.2.6 2005/01/16 22:02:50 sesser Exp $ */ +/* $Id: var_unserializer.c,v 1.38.2.7 2005/01/17 12:13:32 sesser Exp $ */ #include php.h #include ext/standard/php_var.h @@ -152,10 +152,10 @@ -static inline int parse_iv2(const unsigned char *p, const unsigned char **q) +static inline long parse_iv2(const unsigned char *p, const unsigned char **q) { char cursor; - int result = 0; + long result = 0; int neg = 0; switch (*p) { @@ -180,7 +180,7 @@ return result; } -static inline int parse_iv(const unsigned char *p) +static inline long parse_iv(const unsigned char *p) { return parse_iv2(p, NULL); } @@ -213,7 +213,7 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, int elements) { while (elements-- 0) { - zval *key, *data, *old_data; + zval *key, *data, **old_data; ALLOC_INIT_ZVAL(key); http://cvs.php.net/diff.php/php-src/ext/standard/var_unserializer.re?r1=1.27.2.6r2=1.27.2.7ty=u Index: php-src/ext/standard/var_unserializer.re diff -u php-src/ext/standard/var_unserializer.re:1.27.2.6 php-src/ext/standard/var_unserializer.re:1.27.2.7 --- php-src/ext/standard/var_unserializer.re:1.27.2.6 Sun Jan 16 17:02:50 2005 +++ php-src/ext/standard/var_unserializer.reMon Jan 17 07:13:33 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: var_unserializer.re,v 1.27.2.6 2005/01/16 22:02:50 sesser Exp $ */ +/* $Id: var_unserializer.re,v 1.27.2.7 2005/01/17 12:13:33 sesser Exp $ */ #include php.h #include ext/standard/php_var.h @@ -155,10 +155,10 @@ -static inline int parse_iv2(const unsigned char *p, const unsigned char **q) +static inline long parse_iv2(const unsigned char *p, const unsigned char **q) { char cursor; - int result = 0; + long result = 0; int neg = 0; switch (*p) { @@ -183,7 +183,7 @@ return result; } -static inline int parse_iv(const unsigned char *p) +static inline long parse_iv(const unsigned char *p) { return parse_iv2(p, NULL); } @@ -216,7 +216,7 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, int elements) { while (elements-- 0) { - zval *key, *data, *old_data; + zval *key, *data, **old_data; ALLOC_INIT_ZVAL(key); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/odbc php_odbc.c
tony2001Mon Jan 17 10:05:13 2005 EDT Modified files: /php-src/ext/odbc php_odbc.c Log: fix leak appearing when odbc_errormsg() got invalid resource http://cvs.php.net/diff.php/php-src/ext/odbc/php_odbc.c?r1=1.182r2=1.183ty=u Index: php-src/ext/odbc/php_odbc.c diff -u php-src/ext/odbc/php_odbc.c:1.182 php-src/ext/odbc/php_odbc.c:1.183 --- php-src/ext/odbc/php_odbc.c:1.182 Wed Jan 12 21:06:39 2005 +++ php-src/ext/odbc/php_odbc.c Mon Jan 17 10:05:11 2005 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_odbc.c,v 1.182 2005/01/13 02:06:39 wez Exp $ */ +/* $Id: php_odbc.c,v 1.183 2005/01/17 15:05:11 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -2712,15 +2712,17 @@ } else { /* last error message */ len = SQL_MAX_MESSAGE_LENGTH; } - ptr = ecalloc(len + 1, 1); + if (argc == 1) { ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_handle, -1, ODBC-Link, le_conn, le_pconn); + ptr = ecalloc(len + 1, 1); if (mode == 0) { strlcpy(ptr, conn-laststate, len+1); } else { strlcpy(ptr, conn-lasterrormsg, len+1); } } else { + ptr = ecalloc(len + 1, 1); if (mode == 0) { strlcpy(ptr, ODBCG(laststate), len+1); } else { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/odbc php_odbc.c
tony2001Mon Jan 17 10:06:57 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/odbc php_odbc.c Log: MFH: fix leak http://cvs.php.net/diff.php/php-src/ext/odbc/php_odbc.c?r1=1.179r2=1.179.2.1ty=u Index: php-src/ext/odbc/php_odbc.c diff -u php-src/ext/odbc/php_odbc.c:1.179 php-src/ext/odbc/php_odbc.c:1.179.2.1 --- php-src/ext/odbc/php_odbc.c:1.179 Thu Jul 15 11:09:12 2004 +++ php-src/ext/odbc/php_odbc.c Mon Jan 17 10:06:56 2005 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_odbc.c,v 1.179 2004/07/15 15:09:12 kalowsky Exp $ */ +/* $Id: php_odbc.c,v 1.179.2.1 2005/01/17 15:06:56 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -2670,15 +2670,17 @@ } else { /* last error message */ len = SQL_MAX_MESSAGE_LENGTH; } - ptr = ecalloc(len + 1, 1); + if (argc == 1) { ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_handle, -1, ODBC-Link, le_conn, le_pconn); + ptr = ecalloc(len + 1, 1); if (mode == 0) { strlcpy(ptr, conn-laststate, len+1); } else { strlcpy(ptr, conn-lasterrormsg, len+1); } } else { + ptr = ecalloc(len + 1, 1); if (mode == 0) { strlcpy(ptr, ODBCG(laststate), len+1); } else { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/odbc php_odbc.c
tony2001Mon Jan 17 10:07:46 2005 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/odbc php_odbc.c Log: MFH: fix leak http://cvs.php.net/diff.php/php-src/ext/odbc/php_odbc.c?r1=1.143.2.17r2=1.143.2.18ty=u Index: php-src/ext/odbc/php_odbc.c diff -u php-src/ext/odbc/php_odbc.c:1.143.2.17 php-src/ext/odbc/php_odbc.c:1.143.2.18 --- php-src/ext/odbc/php_odbc.c:1.143.2.17 Thu Jun 17 20:44:40 2004 +++ php-src/ext/odbc/php_odbc.c Mon Jan 17 10:07:46 2005 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_odbc.c,v 1.143.2.17 2004/06/18 00:44:40 iliaa Exp $ */ +/* $Id: php_odbc.c,v 1.143.2.18 2005/01/17 15:07:46 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -2669,15 +2669,17 @@ } else { /* last error message */ len = SQL_MAX_MESSAGE_LENGTH; } - ptr = ecalloc(len + 1, 1); + if (argc == 1) { ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_handle, -1, ODBC-Link, le_conn, le_pconn); + ptr = ecalloc(len + 1, 1); if (mode == 0) { strlcpy(ptr, conn-laststate, len+1); } else { strlcpy(ptr, conn-lasterrormsg, len+1); } } else { + ptr = ecalloc(len + 1, 1); if (mode == 0) { strlcpy(ptr, ODBCG(laststate), len+1); } else { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd gd.c
sniper Mon Jan 17 12:07:31 2005 EDT Modified files: /php-src/ext/gd gd.c Log: - Added some sanity checks by changing to the parameter parsing API http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.305r2=1.306ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.305 php-src/ext/gd/gd.c:1.306 --- php-src/ext/gd/gd.c:1.305 Fri Jan 14 23:34:30 2005 +++ php-src/ext/gd/gd.c Mon Jan 17 12:07:28 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.305 2005/01/15 04:34:30 sniper Exp $ */ +/* $Id: gd.c,v 1.306 2005/01/17 17:07:28 sniper Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -3107,13 +3107,13 @@ */ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int extended) { - zval **IM, **PTSIZE, **ANGLE, **X, **Y, **C, **FONTNAME, **COL, **EXT = NULL; + zval *IM, *EXT = NULL; gdImagePtr im=NULL; - int col, x, y, l=0, i, brect[8]; + int col = -1, x = -1, y = -1, str_len, fontname_len, i, brect[8]; double ptsize, angle; unsigned char *str = NULL, *fontname = NULL; char *error = NULL; - int argc; + int argc = ZEND_NUM_ARGS(); #if HAVE_GD_STRINGFTEX gdFTStringExtra strex = {0}; #endif @@ -3122,84 +3122,65 @@ assert(!extended); #endif - argc = ZEND_NUM_ARGS(); - if (mode == TTFTEXT_BBOX) { - if (argc 4 || argc ((extended) ? 5 : 4) || zend_get_parameters_ex(argc, PTSIZE, ANGLE, FONTNAME, C, EXT) == FAILURE) { + if (argc 4 || argc ((extended) ? 5 : 4)) { ZEND_WRONG_PARAM_COUNT(); + } else if (zend_parse_parameters(argc TSRMLS_CC, ddss|a, ptsize, angle, fontname, fontname_len, str, str_len, EXT) == FAILURE) { + RETURN_FALSE; } } else { - if (argc 8 || argc ((extended) ? 9 : 8) || zend_get_parameters_ex(argc, IM, PTSIZE, ANGLE, X, Y, COL, FONTNAME, C, EXT) == FAILURE) { + if (argc 8 || argc ((extended) ? 9 : 8)) { ZEND_WRONG_PARAM_COUNT(); + } else if (zend_parse_parameters(argc TSRMLS_CC, rddlllss|a, IM, ptsize, angle, x, y, col, fontname, fontname_len, str, str_len, EXT) == FAILURE) { + RETURN_FALSE; } - ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd); + ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd); } - convert_to_double_ex(PTSIZE); - convert_to_double_ex(ANGLE); - convert_to_string_ex(FONTNAME); - convert_to_string_ex(C); - - if (mode == TTFTEXT_BBOX) { - im = NULL; - col = x = y = -1; - } else { - convert_to_long_ex(X); - convert_to_long_ex(Y); - convert_to_long_ex(COL); - col = Z_LVAL_PP(COL); - y = Z_LVAL_PP(Y); - x = Z_LVAL_PP(X); - } + /* convert angle to radians */ + angle = angle * (M_PI/180); #if HAVE_GD_STRINGFTEX - if (extended EXT) { - /* parse extended info */ - + if (extended EXT) { /* parse extended info */ HashPosition pos; - convert_to_array_ex(EXT); - /* walk the assoc array */ - zend_hash_internal_pointer_reset_ex(HASH_OF(*EXT), pos); + zend_hash_internal_pointer_reset_ex(HASH_OF(EXT), pos); do { zval ** item; char * key; ulong num_key; - if (zend_hash_get_current_key_ex(HASH_OF(*EXT), key, NULL, num_key, 0, pos) != HASH_KEY_IS_STRING) { + if (zend_hash_get_current_key_ex(HASH_OF(EXT), key, NULL, num_key, 0, pos) != HASH_KEY_IS_STRING) { continue; } - if (zend_hash_get_current_data_ex(HASH_OF(*EXT), (void **) item, pos) == FAILURE) { + if (zend_hash_get_current_data_ex(HASH_OF(EXT), (void **) item, pos) == FAILURE) { continue; } - - if (strcmp(linespacing, key) == 0){ + + if (strcmp(linespacing, key) == 0) { convert_to_double_ex(item); strex.flags |= gdFTEX_LINESPACE; strex.linespacing = Z_DVAL_PP(item); } - } while (zend_hash_move_forward_ex(HASH_OF(*EXT), pos) == SUCCESS); + } while (zend_hash_move_forward_ex(HASH_OF(EXT), pos) == SUCCESS); } #endif - ptsize = Z_DVAL_PP(PTSIZE); - angle = Z_DVAL_PP(ANGLE)
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/gd gd.c
sniper Mon Jan 17 12:07:47 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/gd gd.c Log: MFH: - Added some sanity checks by changing to the parameter parsing API http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.294.2.10r2=1.294.2.11ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.294.2.10 php-src/ext/gd/gd.c:1.294.2.11 --- php-src/ext/gd/gd.c:1.294.2.10 Fri Jan 14 23:35:05 2005 +++ php-src/ext/gd/gd.c Mon Jan 17 12:07:47 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.294.2.10 2005/01/15 04:35:05 sniper Exp $ */ +/* $Id: gd.c,v 1.294.2.11 2005/01/17 17:07:47 sniper Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -3107,13 +3107,13 @@ */ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int extended) { - zval **IM, **PTSIZE, **ANGLE, **X, **Y, **C, **FONTNAME, **COL, **EXT = NULL; + zval *IM, *EXT = NULL; gdImagePtr im=NULL; - int col, x, y, l=0, i, brect[8]; + int col = -1, x = -1, y = -1, str_len, fontname_len, i, brect[8]; double ptsize, angle; unsigned char *str = NULL, *fontname = NULL; char *error = NULL; - int argc; + int argc = ZEND_NUM_ARGS(); #if HAVE_GD_STRINGFTEX gdFTStringExtra strex = {0}; #endif @@ -3122,84 +3122,65 @@ assert(!extended); #endif - argc = ZEND_NUM_ARGS(); - if (mode == TTFTEXT_BBOX) { - if (argc 4 || argc ((extended) ? 5 : 4) || zend_get_parameters_ex(argc, PTSIZE, ANGLE, FONTNAME, C, EXT) == FAILURE) { + if (argc 4 || argc ((extended) ? 5 : 4)) { ZEND_WRONG_PARAM_COUNT(); + } else if (zend_parse_parameters(argc TSRMLS_CC, ddss|a, ptsize, angle, fontname, fontname_len, str, str_len, EXT) == FAILURE) { + RETURN_FALSE; } } else { - if (argc 8 || argc ((extended) ? 9 : 8) || zend_get_parameters_ex(argc, IM, PTSIZE, ANGLE, X, Y, COL, FONTNAME, C, EXT) == FAILURE) { + if (argc 8 || argc ((extended) ? 9 : 8)) { ZEND_WRONG_PARAM_COUNT(); + } else if (zend_parse_parameters(argc TSRMLS_CC, rddlllss|a, IM, ptsize, angle, x, y, col, fontname, fontname_len, str, str_len, EXT) == FAILURE) { + RETURN_FALSE; } - ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd); + ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd); } - convert_to_double_ex(PTSIZE); - convert_to_double_ex(ANGLE); - convert_to_string_ex(FONTNAME); - convert_to_string_ex(C); - - if (mode == TTFTEXT_BBOX) { - im = NULL; - col = x = y = -1; - } else { - convert_to_long_ex(X); - convert_to_long_ex(Y); - convert_to_long_ex(COL); - col = Z_LVAL_PP(COL); - y = Z_LVAL_PP(Y); - x = Z_LVAL_PP(X); - } + /* convert angle to radians */ + angle = angle * (M_PI/180); #if HAVE_GD_STRINGFTEX - if (extended EXT) { - /* parse extended info */ - + if (extended EXT) { /* parse extended info */ HashPosition pos; - convert_to_array_ex(EXT); - /* walk the assoc array */ - zend_hash_internal_pointer_reset_ex(HASH_OF(*EXT), pos); + zend_hash_internal_pointer_reset_ex(HASH_OF(EXT), pos); do { zval ** item; char * key; ulong num_key; - if (zend_hash_get_current_key_ex(HASH_OF(*EXT), key, NULL, num_key, 0, pos) != HASH_KEY_IS_STRING) { + if (zend_hash_get_current_key_ex(HASH_OF(EXT), key, NULL, num_key, 0, pos) != HASH_KEY_IS_STRING) { continue; } - if (zend_hash_get_current_data_ex(HASH_OF(*EXT), (void **) item, pos) == FAILURE) { + if (zend_hash_get_current_data_ex(HASH_OF(EXT), (void **) item, pos) == FAILURE) { continue; } - - if (strcmp(linespacing, key) == 0){ + + if (strcmp(linespacing, key) == 0) { convert_to_double_ex(item); strex.flags |= gdFTEX_LINESPACE; strex.linespacing = Z_DVAL_PP(item); } - } while (zend_hash_move_forward_ex(HASH_OF(*EXT), pos) == SUCCESS); + } while (zend_hash_move_forward_ex(HASH_OF(EXT), pos) == SUCCESS); } #endif -
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/gd gd.c
sniper Mon Jan 17 12:07:58 2005 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/gd gd.c Log: MFH: - Added some sanity checks by changing to the parameter parsing API http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.221.2.53r2=1.221.2.54ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.221.2.53 php-src/ext/gd/gd.c:1.221.2.54 --- php-src/ext/gd/gd.c:1.221.2.53 Mon Jan 17 11:59:23 2005 +++ php-src/ext/gd/gd.c Mon Jan 17 12:07:57 2005 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.221.2.53 2005/01/17 16:59:23 sniper Exp $ */ +/* $Id: gd.c,v 1.221.2.54 2005/01/17 17:07:57 sniper Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -3015,13 +3015,13 @@ */ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int extended) { - zval **IM, **PTSIZE, **ANGLE, **X, **Y, **C, **FONTNAME, **COL, **EXT = NULL; + zval *IM, *EXT = NULL; gdImagePtr im=NULL; - int col, x, y, l=0, i, brect[8]; + int col = -1, x = -1, y = -1, str_len, fontname_len, i, brect[8]; double ptsize, angle; unsigned char *str = NULL, *fontname = NULL; char *error = NULL; - int argc; + int argc = ZEND_NUM_ARGS(); #if HAVE_GD_STRINGFTEX gdFTStringExtra strex = {0}; #endif @@ -3030,84 +3030,65 @@ assert(!extended); #endif - argc = ZEND_NUM_ARGS(); - if (mode == TTFTEXT_BBOX) { - if (argc 4 || argc ((extended) ? 5 : 4) || zend_get_parameters_ex(argc, PTSIZE, ANGLE, FONTNAME, C, EXT) == FAILURE) { + if (argc 4 || argc ((extended) ? 5 : 4)) { ZEND_WRONG_PARAM_COUNT(); + } else if (zend_parse_parameters(argc TSRMLS_CC, ddss|a, ptsize, angle, fontname, fontname_len, str, str_len, EXT) == FAILURE) { + RETURN_FALSE; } } else { - if (argc 8 || argc ((extended) ? 9 : 8) || zend_get_parameters_ex(argc, IM, PTSIZE, ANGLE, X, Y, COL, FONTNAME, C, EXT) == FAILURE) { + if (argc 8 || argc ((extended) ? 9 : 8)) { ZEND_WRONG_PARAM_COUNT(); + } else if (zend_parse_parameters(argc TSRMLS_CC, rddlllss|a, IM, ptsize, angle, x, y, col, fontname, fontname_len, str, str_len, EXT) == FAILURE) { + RETURN_FALSE; } - ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd); + ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, Image, le_gd); } - convert_to_double_ex(PTSIZE); - convert_to_double_ex(ANGLE); - convert_to_string_ex(FONTNAME); - convert_to_string_ex(C); - - if (mode == TTFTEXT_BBOX) { - im = NULL; - col = x = y = -1; - } else { - convert_to_long_ex(X); - convert_to_long_ex(Y); - convert_to_long_ex(COL); - col = Z_LVAL_PP(COL); - y = Z_LVAL_PP(Y); - x = Z_LVAL_PP(X); - } + /* convert angle to radians */ + angle = angle * (M_PI/180); #if HAVE_GD_STRINGFTEX - if (extended EXT) { - /* parse extended info */ - + if (extended EXT) { /* parse extended info */ HashPosition pos; - convert_to_array_ex(EXT); - /* walk the assoc array */ - zend_hash_internal_pointer_reset_ex(HASH_OF(*EXT), pos); + zend_hash_internal_pointer_reset_ex(HASH_OF(EXT), pos); do { zval ** item; char * key; ulong num_key; - if (zend_hash_get_current_key_ex(HASH_OF(*EXT), key, NULL, num_key, 0, pos) != HASH_KEY_IS_STRING) { + if (zend_hash_get_current_key_ex(HASH_OF(EXT), key, NULL, num_key, 0, pos) != HASH_KEY_IS_STRING) { continue; } - if (zend_hash_get_current_data_ex(HASH_OF(*EXT), (void **) item, pos) == FAILURE) { + if (zend_hash_get_current_data_ex(HASH_OF(EXT), (void **) item, pos) == FAILURE) { continue; } - - if (strcmp(linespacing, key) == 0){ + + if (strcmp(linespacing, key) == 0) { convert_to_double_ex(item); strex.flags |= gdFTEX_LINESPACE; strex.linespacing = Z_DVAL_PP(item); } - } while (zend_hash_move_forward_ex(HASH_OF(*EXT), pos) == SUCCESS); + } while (zend_hash_move_forward_ex(HASH_OF(EXT), pos) == SUCCESS); } #endif -
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/xsl php_xsl.c php_xsl.h
chregu Mon Jan 17 11:06:57 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/xslphp_xsl.c php_xsl.h Log: revert these 2 files... shouldn't have been comitted .. http://cvs.php.net/diff.php/php-src/ext/xsl/php_xsl.c?r1=1.22.2.5r2=1.22.2.6ty=u Index: php-src/ext/xsl/php_xsl.c diff -u php-src/ext/xsl/php_xsl.c:1.22.2.5 php-src/ext/xsl/php_xsl.c:1.22.2.6 --- php-src/ext/xsl/php_xsl.c:1.22.2.5 Mon Jan 17 11:01:35 2005 +++ php-src/ext/xsl/php_xsl.c Mon Jan 17 11:06:57 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_xsl.c,v 1.22.2.5 2005/01/17 16:01:35 chregu Exp $ */ +/* $Id: php_xsl.c,v 1.22.2.6 2005/01/17 16:06:57 chregu Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -83,11 +83,6 @@ FREE_HASHTABLE(intern-node_list); } - if (intern-doc) { - php_libxml_decrement_doc_ref(intern-doc TSRMLS_CC); - efree(intern-doc); - } - if (intern-ptr) { /* free wrapper */ if (((xsltStylesheetPtr) intern-ptr)-_private != NULL) { @@ -117,7 +112,6 @@ intern-hasKeys = 0; intern-registerPhpFunctions = 0; intern-node_list = NULL; - intern-doc = NULL; ALLOC_HASHTABLE(intern-std.properties); zend_hash_init(intern-std.properties, 0, NULL, ZVAL_PTR_DTOR, 0); http://cvs.php.net/diff.php/php-src/ext/xsl/php_xsl.h?r1=1.10.2.3r2=1.10.2.4ty=u Index: php-src/ext/xsl/php_xsl.h diff -u php-src/ext/xsl/php_xsl.h:1.10.2.3 php-src/ext/xsl/php_xsl.h:1.10.2.4 --- php-src/ext/xsl/php_xsl.h:1.10.2.3 Mon Jan 17 11:01:35 2005 +++ php-src/ext/xsl/php_xsl.h Mon Jan 17 11:06:57 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_xsl.h,v 1.10.2.3 2005/01/17 16:01:35 chregu Exp $ */ +/* $Id: php_xsl.h,v 1.10.2.4 2005/01/17 16:06:57 chregu Exp $ */ #ifndef PHP_XSL_H #define PHP_XSL_H @@ -58,7 +58,6 @@ int hasKeys; int registerPhpFunctions; HashTable *node_list; - php_libxml_node_object *doc; } xsl_object; void php_xsl_set_object(zval *wrapper, void *obj TSRMLS_DC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/xsl xsltprocessor.c
chregu Mon Jan 17 10:56:18 2005 EDT Modified files: /php-src/ext/xslxsltprocessor.c Log: fix protos (by Mehdi Achour ) http://cvs.php.net/diff.php/php-src/ext/xsl/xsltprocessor.c?r1=1.34r2=1.35ty=u Index: php-src/ext/xsl/xsltprocessor.c diff -u php-src/ext/xsl/xsltprocessor.c:1.34 php-src/ext/xsl/xsltprocessor.c:1.35 --- php-src/ext/xsl/xsltprocessor.c:1.34Wed Sep 8 12:54:17 2004 +++ php-src/ext/xsl/xsltprocessor.c Mon Jan 17 10:56:17 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: xsltprocessor.c,v 1.34 2004/09/08 16:54:17 rrichards Exp $ */ +/* $Id: xsltprocessor.c,v 1.35 2005/01/17 15:56:17 chregu Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -324,7 +324,7 @@ } -/* {{{ proto xsl_xsltdocucument xsl_xsltprocessor_import_stylesheet(node index); +/* {{{ proto void xsl_xsltprocessor_import_stylesheet(domdocument doc); URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html# Since: */ @@ -457,7 +457,7 @@ } -/* {{{ proto xsl_document xsl_xsltprocessor_transform_to_doc(node doc [,boolean clone]); +/* {{{ proto domdocument xsl_xsltprocessor_transform_to_doc(domnode doc); URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html# Since: */ @@ -501,7 +501,7 @@ /* }}} end xsl_xsltprocessor_transform_to_doc */ -/* {{{ proto xsl_ xsl_xsltprocessor_transform_to_uri(node doc, string uri [,boolean clone]); +/* {{{ proto int xsl_xsltprocessor_transform_to_uri(domdocument doc, string uri); */ PHP_FUNCTION(xsl_xsltprocessor_transform_to_uri) { @@ -545,7 +545,7 @@ /* }}} end xsl_xsltprocessor_transform_to_uri */ -/* {{{ proto xsl_string xsl_xsltprocessor_transform_to_xml(node doc [,boolean clone]); +/* {{{ proto string xsl_xsltprocessor_transform_to_xml(domdocument doc); */ PHP_FUNCTION(xsl_xsltprocessor_transform_to_xml) { @@ -596,7 +596,7 @@ /* }}} end xsl_xsltprocessor_transform_to_xml */ -/* {{{ proto xsl_ xsl_xsltprocessor_set_parameter(string namespace, mixed name [, string value]); +/* {{{ proto bool xsl_xsltprocessor_set_parameter(string namespace, mixed name [, string value]); */ PHP_FUNCTION(xsl_xsltprocessor_set_parameter) { @@ -647,7 +647,7 @@ } /* }}} end xsl_xsltprocessor_set_parameter */ -/* {{{ proto xsl_ xsl_xsltprocessor_get_parameter(string namespace, string name); +/* {{{ proto string xsl_xsltprocessor_get_parameter(string namespace, string name); */ PHP_FUNCTION(xsl_xsltprocessor_get_parameter) { @@ -672,7 +672,7 @@ } /* }}} end xsl_xsltprocessor_get_parameter */ -/* {{{ proto xsl_ xsl_xsltprocessor_remove_parameter(string namespace, string name); +/* {{{ proto bool xsl_xsltprocessor_remove_parameter(string namespace, string name); */ PHP_FUNCTION(xsl_xsltprocessor_remove_parameter) { @@ -695,7 +695,7 @@ } /* }}} end xsl_xsltprocessor_remove_parameter */ -/* {{{ proto xsl_xsltprocessor_register_php_functions(); +/* {{{ proto void xsl_xsltprocessor_register_php_functions(); */ PHP_FUNCTION(xsl_xsltprocessor_register_php_functions) { @@ -711,7 +711,7 @@ } /* }}} end xsl_xsltprocessor_register_php_functions(); */ -/* {{{ proto xsl_xsltprocessor_has_exslt_support(); +/* {{{ proto bool xsl_xsltprocessor_has_exslt_support(); */ PHP_FUNCTION(xsl_xsltprocessor_has_exslt_support) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/odbc php_odbc.c
tony2001Mon Jan 17 13:08:55 2005 EDT Modified files: /php-src/ext/odbc php_odbc.c Log: fix weird DB2 issue: DB2's SQLDataSources() returns _max available_ length of result string instead of _real_ length and that results in strings a-la \0 http://cvs.php.net/diff.php/php-src/ext/odbc/php_odbc.c?r1=1.183r2=1.184ty=u Index: php-src/ext/odbc/php_odbc.c diff -u php-src/ext/odbc/php_odbc.c:1.183 php-src/ext/odbc/php_odbc.c:1.184 --- php-src/ext/odbc/php_odbc.c:1.183 Mon Jan 17 10:05:11 2005 +++ php-src/ext/odbc/php_odbc.c Mon Jan 17 13:08:54 2005 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_odbc.c,v 1.183 2005/01/17 15:05:11 tony2001 Exp $ */ +/* $Id: php_odbc.c,v 1.184 2005/01/17 18:08:54 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1232,8 +1232,8 @@ array_init(return_value); - add_assoc_stringl_ex(return_value, server, sizeof(server), server_name, len1, 1); - add_assoc_stringl_ex(return_value, description, sizeof(description), desc, len2, 1); + add_assoc_string_ex(return_value, server, sizeof(server), server_name, 1); + add_assoc_string_ex(return_value, description, sizeof(description), desc, 1); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/odbc php_odbc.c
tony2001Mon Jan 17 13:11:39 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/odbc php_odbc.c Log: MFH: fix weird DB2 issue http://cvs.php.net/diff.php/php-src/ext/odbc/php_odbc.c?r1=1.179.2.1r2=1.179.2.2ty=u Index: php-src/ext/odbc/php_odbc.c diff -u php-src/ext/odbc/php_odbc.c:1.179.2.1 php-src/ext/odbc/php_odbc.c:1.179.2.2 --- php-src/ext/odbc/php_odbc.c:1.179.2.1 Mon Jan 17 10:06:56 2005 +++ php-src/ext/odbc/php_odbc.c Mon Jan 17 13:11:36 2005 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_odbc.c,v 1.179.2.1 2005/01/17 15:06:56 tony2001 Exp $ */ +/* $Id: php_odbc.c,v 1.179.2.2 2005/01/17 18:11:36 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1232,8 +1232,8 @@ array_init(return_value); - add_assoc_stringl_ex(return_value, server, sizeof(server), server_name, len1, 1); - add_assoc_stringl_ex(return_value, description, sizeof(description), desc, len2, 1); + add_assoc_string_ex(return_value, server, sizeof(server), server_name, 1); + add_assoc_string_ex(return_value, description, sizeof(description), desc, 1); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/odbc php_odbc.c
tony2001Mon Jan 17 13:12:07 2005 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/odbc php_odbc.c Log: MFH: fix wierd DB2 issue http://cvs.php.net/diff.php/php-src/ext/odbc/php_odbc.c?r1=1.143.2.18r2=1.143.2.19ty=u Index: php-src/ext/odbc/php_odbc.c diff -u php-src/ext/odbc/php_odbc.c:1.143.2.18 php-src/ext/odbc/php_odbc.c:1.143.2.19 --- php-src/ext/odbc/php_odbc.c:1.143.2.18 Mon Jan 17 10:07:46 2005 +++ php-src/ext/odbc/php_odbc.c Mon Jan 17 13:12:06 2005 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_odbc.c,v 1.143.2.18 2005/01/17 15:07:46 tony2001 Exp $ */ +/* $Id: php_odbc.c,v 1.143.2.19 2005/01/17 18:12:06 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1231,8 +1231,8 @@ array_init(return_value); - add_assoc_stringl_ex(return_value, server, sizeof(server), server_name, len1, 1); - add_assoc_stringl_ex(return_value, description, sizeof(description), desc, len2, 1); + add_assoc_string_ex(return_value, server, sizeof(server), server_name, 1); + add_assoc_string_ex(return_value, description, sizeof(description), desc, 1); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/standard file.c
iliaa Mon Jan 17 19:14:56 2005 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS /php-src/ext/standard file.c Log: Fixed bug #31580 (fgetcsv() problematic with escape sequences). http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.803r2=1.1247.2.804ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.803 php-src/NEWS:1.1247.2.804 --- php-src/NEWS:1.1247.2.803 Mon Jan 17 12:22:21 2005 +++ php-src/NEWSMon Jan 17 19:14:55 2005 @@ -3,6 +3,7 @@ ?? ??? , Version 4.3.11 - Fixed MacOSX shared extensions crashing on Apache startup. (Rasmus) - Added Oracle Instant Client support. (cjbj at hotmail dot com, Tony) +- Fixed bug #31580 (fgetcsv() problematic with escape sequences). (Ilia) - Fixed bug #31454 (session_set_save_handler crashes PHP when supplied non-existent object ref). (Tony) - Fixed bug #31444 (Memory leak in zend_language_scanner.c). http://cvs.php.net/diff.php/php-src/ext/standard/file.c?r1=1.279.2.67r2=1.279.2.68ty=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.279.2.67 php-src/ext/standard/file.c:1.279.2.68 --- php-src/ext/standard/file.c:1.279.2.67 Wed Dec 8 16:15:02 2004 +++ php-src/ext/standard/file.c Mon Jan 17 19:14:56 2005 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.279.2.67 2004/12/08 21:15:02 iliaa Exp $ */ +/* $Id: file.c,v 1.279.2.68 2005/01/18 00:14:56 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2427,9 +2427,6 @@ if ((p = memchr(p2, delimiter, (e - p2 { p2 = s; s = p + 1; - if (*p2 == enclosure) { - p2++; - } /* copy data to buffer */ buf2 = erealloc(buf2, buf2_len + (p - p2) + 1); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mssql php_mssql.c
fmk Tue Jan 18 01:09:49 2005 EDT Modified files: /php-src/ext/mssql php_mssql.c Log: make the mssql extension work with freetds on win32 http://cvs.php.net/diff.php/php-src/ext/mssql/php_mssql.c?r1=1.145r2=1.146ty=u Index: php-src/ext/mssql/php_mssql.c diff -u php-src/ext/mssql/php_mssql.c:1.145 php-src/ext/mssql/php_mssql.c:1.146 --- php-src/ext/mssql/php_mssql.c:1.145 Thu Dec 16 16:47:23 2004 +++ php-src/ext/mssql/php_mssql.c Tue Jan 18 01:09:48 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mssql.c,v 1.145 2004/12/16 21:47:23 fmk Exp $ */ +/* $Id: php_mssql.c,v 1.146 2005/01/18 06:09:48 fmk Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -468,6 +468,11 @@ #ifndef HAVE_FREETDS } #endif + +#ifdef HAVE_FREETDS + DBSETLCHARSET(mssql.login, ISO-8859-1); +#endif + DBSETLAPP(mssql.login,MS_SQL_G(appname)); mssql.valid = 1; @@ -638,6 +643,7 @@ RETURN_FALSE; } +#ifndef HAVE_FREETDS if (MS_SQL_G(textlimit) != -1) { sprintf(buffer, %li, MS_SQL_G(textlimit)); if (DBSETOPT(mssql.link, DBTEXTLIMIT, buffer)==FAIL) { @@ -647,6 +653,7 @@ RETURN_FALSE; } } +#endif if (MS_SQL_G(textsize) != -1) { sprintf(buffer, SET TEXTSIZE %li, MS_SQL_G(textsize)); dbcmd(mssql.link, buffer); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php