[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Mon Nov 3 20:32:42 2003 EDT Modified files: /php-srcChangeLog Log: ChangeLog update Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.1436 php-src/ChangeLog:1.1437 --- php-src/ChangeLog:1.1436Sun Nov 2 20:34:42 2003 +++ php-src/ChangeLog Mon Nov 3 20:32:36 2003 @@ -1,3 +1,54 @@ +2003-11-03 Jani Taskinen [EMAIL PROTECTED] + +* (PHP_4_3) + NEWS: + cosmetics + +2003-11-03 Moriyoshi Koizumi [EMAIL PROTECTED] + +* ext/simplexml/tests/008.phpt: + Add regression test for XPath support + +* ext/simplexml/tests/007.phpt: + Fix test + +2003-11-03 Derick Rethans [EMAIL PROTECTED] + +* ext/standard/streamsfuncs.c + main/php.h + main/php_streams.h + main/streams/streams.c: + - Always store the URI path in the streams structure, and expose it with +stream_get_meta_data(). + +2003-11-03 Sterling Hughes [EMAIL PROTECTED] + +* ext/simplexml/simplexml.c: + make this macro safe + +* ext/simplexml/simplexml.c: + remove attributes from this check + +* ext/simplexml/simplexml.c: + - Stop a crash in xpath + - Remove the ability to access attributes via the - operator, attributes + are accessed via the array indicators + +2003-11-03 Stefan Esser [EMAIL PROTECTED] + +* main/rfc1867.c: + Fixed possible crashbug. + +2003-11-03 Marc Boeren [EMAIL PROTECTED] + +* ext/dbx/dbx.c: + Make life for the doc-team easier, without causing harm ;-) + +2003-11-03 Stefan Esser [EMAIL PROTECTED] + +* main/rfc1867.c: + It is usually a good idea to write only into allocated bufferspace. + 2003-11-02 Edin Kadribasic [EMAIL PROTECTED] * (PHP_4_3)
[PHP-CVS] cvs: php-src /main rfc1867.c
sesser Mon Nov 3 04:16:25 2003 EDT Modified files: /php-src/main rfc1867.c Log: It is usually a good idea to write only into allocated bufferspace. Index: php-src/main/rfc1867.c diff -u php-src/main/rfc1867.c:1.142 php-src/main/rfc1867.c:1.143 --- php-src/main/rfc1867.c:1.142Wed Oct 22 10:14:04 2003 +++ php-src/main/rfc1867.c Mon Nov 3 04:16:24 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: rfc1867.c,v 1.142 2003/10/22 14:14:04 hirokawa Exp $ */ +/* $Id: rfc1867.c,v 1.143 2003/11/03 09:16:24 sesser Exp $ */ /* * This product includes software developed by the Apache Group @@ -78,8 +78,8 @@ if (*num_vars=*num_vars_max){ (*num_vars_max) += 16; - *pval_list = (char **)erealloc(val_list, *num_vars_max*sizeof(char *)); - *plen_list = (int *)erealloc(len_list, *num_vars_max*sizeof(int)); + *pval_list = (char **)erealloc(val_list, (*num_vars_max+2)*sizeof(char *)); + *plen_list = (int *)erealloc(len_list, (*num_vars_max+2)*sizeof(int)); val_list=*pval_list; len_list=*plen_list; } @@ -755,7 +755,7 @@ int max_file_size=0, skip_upload=0, anonindex=0, is_anonymous; zval *http_post_files=NULL; #if HAVE_MBSTRING !defined(COMPILE_DL_MBSTRING) - int str_len = 0, num_vars = 0, num_vars_max = 2*10+1, *len_list = NULL; + int str_len = 0, num_vars = 0, num_vars_max = 2*10, *len_list = NULL; char **val_list = NULL; #endif zend_bool magic_quotes_gpc; @@ -814,8 +814,8 @@ #if HAVE_MBSTRING !defined(COMPILE_DL_MBSTRING) if (php_mb_encoding_translation(TSRMLS_C)) { - val_list = (char **)ecalloc(num_vars_max, sizeof(char *)); - len_list = (int *)ecalloc(num_vars_max, sizeof(int)); + val_list = (char **)ecalloc(num_vars_max+2, sizeof(char *)); + len_list = (int *)ecalloc(num_vars_max+2, sizeof(int)); } #endif zend_llist_init(header, sizeof(mime_header_entry), (llist_dtor_func_t) php_free_hdr_entry, 0); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/dbx dbx.c
mboeren Mon Nov 3 06:15:24 2003 EDT Modified files: /php-src/ext/dbxdbx.c Log: Make life for the doc-team easier, without causing harm ;-) Index: php-src/ext/dbx/dbx.c diff -u php-src/ext/dbx/dbx.c:1.55 php-src/ext/dbx/dbx.c:1.56 --- php-src/ext/dbx/dbx.c:1.55 Mon Sep 8 03:19:08 2003 +++ php-src/ext/dbx/dbx.c Mon Nov 3 06:15:23 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: dbx.c,v 1.55 2003/09/08 07:19:08 mboeren Exp $ */ +/* $Id: dbx.c,v 1.56 2003/11/03 11:15:23 mboeren Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -365,7 +365,7 @@ } /* }}} */ -/* {{{ proto dbx_result_object dbx_query(dbx_link_object dbx_link, string sql_statement [, long flags]) +/* {{{ proto dbx_result_object dbx_query(dbx_link_object dbx_link, string sql_statement [, int flags]) Returns a dbx_link_object on success and returns 0 on failure */ ZEND_FUNCTION(dbx_query) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main rfc1867.c
sesser Mon Nov 3 06:46:34 2003 EDT Modified files: /php-src/main rfc1867.c Log: Fixed possible crashbug. Index: php-src/main/rfc1867.c diff -u php-src/main/rfc1867.c:1.143 php-src/main/rfc1867.c:1.144 --- php-src/main/rfc1867.c:1.143Mon Nov 3 04:16:24 2003 +++ php-src/main/rfc1867.c Mon Nov 3 06:46:33 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: rfc1867.c,v 1.143 2003/11/03 09:16:24 sesser Exp $ */ +/* $Id: rfc1867.c,v 1.144 2003/11/03 11:46:33 sesser Exp $ */ /* * This product includes software developed by the Apache Group @@ -139,7 +139,7 @@ /* and remove it */ if (s != varname) { - memcpy(varname, s, strlen(s)+1); + memmove(varname, s, strlen(s)+1); } for (p=varname; *p *p != '['; p++) { @@ -170,7 +170,7 @@ indexend = indexend ? indexend + 1 : index + strlen(index); if (s != index) { - memcpy(s, index, strlen(s)+1); + memmove(s, index, strlen(index)+1); s += indexend-index; } else { s = indexend; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/simplexml simplexml.c
sterlingMon Nov 3 08:36:24 2003 EDT Modified files: /php-src/ext/simplexml simplexml.c Log: - Stop a crash in xpath - Remove the ability to access attributes via the - operator, attributes are accessed via the array indicators Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.78 php-src/ext/simplexml/simplexml.c:1.79 --- php-src/ext/simplexml/simplexml.c:1.78 Wed Oct 29 13:04:24 2003 +++ php-src/ext/simplexml/simplexml.c Mon Nov 3 08:36:23 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: simplexml.c,v 1.78 2003/10/29 18:04:24 moriyoshi Exp $ */ +/* $Id: simplexml.c,v 1.79 2003/11/03 13:36:23 sterling Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -227,7 +227,7 @@ static zval * sxe_property_read(zval *object, zval *member, zend_bool silent TSRMLS_DC) { - return sxe_prop_dim_read(object, member, 1, 1, silent TSRMLS_CC); + return sxe_prop_dim_read(object, member, 1, 0, silent TSRMLS_CC); } /* }}} */ @@ -634,6 +634,7 @@ char *query; intquery_len; inti; + xmlXPathObjectPtr retval; xmlNodeSetPtr result; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, query, query_len) == FAILURE) { @@ -650,7 +651,13 @@ sxe-xpath-node = sxe-node-node; - result = xmlXPathEval(query, sxe-xpath)-nodesetval; + retval = xmlXPathEval(query, sxe-xpath); + if (!retval) { + RETURN_FALSE; + } + + + result = retval-nodesetval; if (!result) { RETURN_FALSE; } @@ -1393,7 +1400,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, Simplexml support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.78 $); + php_info_print_table_row(2, Revision, $Revision: 1.79 $); php_info_print_table_row(2, Schema support, #ifdef LIBXML_SCHEMAS_ENABLED enabled); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/simplexml simplexml.c
sterlingMon Nov 3 08:50:44 2003 EDT Modified files: /php-src/ext/simplexml simplexml.c Log: remove attributes from this check Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.79 php-src/ext/simplexml/simplexml.c:1.80 --- php-src/ext/simplexml/simplexml.c:1.79 Mon Nov 3 08:36:23 2003 +++ php-src/ext/simplexml/simplexml.c Mon Nov 3 08:50:43 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: simplexml.c,v 1.79 2003/11/03 13:36:23 sterling Exp $ */ +/* $Id: simplexml.c,v 1.80 2003/11/03 13:50:43 sterling Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -368,15 +368,6 @@ GET_NODE(sxe, node); if (node) { - attr = node-properties; - while (attr) { - if (!xmlStrcmp(attr-name, name)) { - return 1; - } - - attr = attr-next; - } - node = node-children; while (node) { SKIP_TEXT(node); @@ -1400,7 +1391,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, Simplexml support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.79 $); + php_info_print_table_row(2, Revision, $Revision: 1.80 $); php_info_print_table_row(2, Schema support, #ifdef LIBXML_SCHEMAS_ENABLED enabled); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/simplexml simplexml.c
sterlingMon Nov 3 08:55:20 2003 EDT Modified files: /php-src/ext/simplexml simplexml.c Log: make this macro safe Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.80 php-src/ext/simplexml/simplexml.c:1.81 --- php-src/ext/simplexml/simplexml.c:1.80 Mon Nov 3 08:50:43 2003 +++ php-src/ext/simplexml/simplexml.c Mon Nov 3 08:55:19 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: simplexml.c,v 1.80 2003/11/03 13:50:43 sterling Exp $ */ +/* $Id: simplexml.c,v 1.81 2003/11/03 13:55:19 sterling Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -81,8 +81,8 @@ } #define GET_NODE(__s, __n) { \ - if (__s-node __s-node-node) { \ - __n = __s-node-node; \ + if ((__s)-node (__s)-node-node) { \ + __n = (__s)-node-node; \ } else { \ __n = NULL; \ php_error(E_WARNING, Node no longer exists); \ @@ -1391,7 +1391,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, Simplexml support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.80 $); + php_info_print_table_row(2, Revision, $Revision: 1.81 $); php_info_print_table_row(2, Schema support, #ifdef LIBXML_SCHEMAS_ENABLED enabled); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard streamsfuncs.c /main php.h php_streams.h /main/streams streams.c
derick Mon Nov 3 09:12:47 2003 EDT Modified files: /php-src/ext/standard streamsfuncs.c /php-src/main php.h php_streams.h /php-src/main/streams streams.c Log: - Always store the URI path in the streams structure, and expose it with stream_get_meta_data(). Index: php-src/ext/standard/streamsfuncs.c diff -u php-src/ext/standard/streamsfuncs.c:1.26 php-src/ext/standard/streamsfuncs.c:1.27 --- php-src/ext/standard/streamsfuncs.c:1.26Wed Oct 8 06:07:25 2003 +++ php-src/ext/standard/streamsfuncs.c Mon Nov 3 09:12:44 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: streamsfuncs.c,v 1.26 2003/10/08 10:07:25 wez Exp $ */ +/* $Id: streamsfuncs.c,v 1.27 2003/11/03 14:12:44 derick Exp $ */ #include php.h #include php_globals.h @@ -364,6 +364,7 @@ add_assoc_long(return_value, unread_bytes, stream-writepos - stream-readpos); add_assoc_bool(return_value, seekable, (stream-ops-seek) (stream-flags PHP_STREAM_FLAG_NO_SEEK) == 0); + add_assoc_string(return_value, uri, stream-orig_path, 1); if (!php_stream_populate_meta_data(stream, return_value)) { add_assoc_bool(return_value, timed_out, 0); Index: php-src/main/php.h diff -u php-src/main/php.h:1.199 php-src/main/php.h:1.200 --- php-src/main/php.h:1.199Wed Sep 24 19:20:48 2003 +++ php-src/main/php.h Mon Nov 3 09:12:45 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.199 2003/09/24 23:20:48 iliaa Exp $ */ +/* $Id: php.h,v 1.200 2003/11/03 14:12:45 derick Exp $ */ #ifndef PHP_H #define PHP_H @@ -26,7 +26,7 @@ #include dmalloc.h #endif -#define PHP_API_VERSION 20030820 +#define PHP_API_VERSION 20031103 #define PHP_HAVE_STREAMS #define YYDEBUG 0 Index: php-src/main/php_streams.h diff -u php-src/main/php_streams.h:1.83 php-src/main/php_streams.h:1.84 --- php-src/main/php_streams.h:1.83 Tue Jul 29 14:26:34 2003 +++ php-src/main/php_streams.h Mon Nov 3 09:12:45 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_streams.h,v 1.83 2003/07/29 18:26:34 iliaa Exp $ */ +/* $Id: php_streams.h,v 1.84 2003/11/03 14:12:45 derick Exp $ */ #ifndef PHP_STREAMS_H #define PHP_STREAMS_H @@ -194,8 +194,8 @@ FILE *stdiocast;/* cache this, otherwise we might leak! */ #if ZEND_DEBUG int __exposed; /* non-zero if exposed as a zval somewhere */ - char *__orig_path; /* it really helps when debugging unclosed streams */ #endif + char *orig_path; php_stream_context *context; int flags; /* PHP_STREAM_FLAG_XXX */ Index: php-src/main/streams/streams.c diff -u php-src/main/streams/streams.c:1.38 php-src/main/streams/streams.c:1.39 --- php-src/main/streams/streams.c:1.38 Sun Oct 19 16:59:12 2003 +++ php-src/main/streams/streams.c Mon Nov 3 09:12:46 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: streams.c,v 1.38 2003/10/19 20:59:12 shane Exp $ */ +/* $Id: streams.c,v 1.39 2003/11/03 14:12:46 derick Exp $ */ #define _GNU_SOURCE #include php.h @@ -265,7 +265,7 @@ int release_cast = 1; #if STREAM_DEBUG -fprintf(stderr, stream_free: %s:%p[%s] in_free=%d opts=%08x\n, stream-ops-label, stream, stream-__orig_path, stream-in_free, close_options); +fprintf(stderr, stream_free: %s:%p[%s] in_free=%d opts=%08x\n, stream-ops-label, stream, stream-orig_path, stream-in_free, close_options); #endif /* recursion protection */ @@ -295,7 +295,7 @@ #if STREAM_DEBUG fprintf(stderr, stream_free: %s:%p[%s] preserve_handle=%d release_cast=%d remove_rsrc=%d\n, - stream-ops-label, stream, stream-__orig_path, preserve_handle, release_cast, remove_rsrc); + stream-ops-label, stream, stream-orig_path, preserve_handle, release_cast, remove_rsrc); #endif /* make sure everything is saved */ @@ -368,11 +368,11 @@ * as leaked; it will log a warning, but lets help it out and display what kind * of stream it was. */ char *leakinfo; - spprintf(leakinfo, 0, __FILE__ (%d) : Stream of type '%s' %p (path:%s) was not closed\n, __LINE__, stream-ops-label, stream, stream-__orig_path); + spprintf(leakinfo, 0, __FILE__ (%d) : Stream of type '%s' %p (path:%s) was not closed\n, __LINE__, stream-ops-label, stream, stream-orig_path); - if (stream-__orig_path) { - pefree(stream-__orig_path, stream-is_persistent); - stream-__orig_path = NULL; + if (stream-orig_path) { + pefree(stream-orig_path, stream-is_persistent
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS
sniper Mon Nov 3 18:16:30 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS Log: cosmetics Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.451 php-src/NEWS:1.1247.2.452 --- php-src/NEWS:1.1247.2.451 Sun Nov 2 16:56:26 2003 +++ php-src/NEWSMon Nov 3 18:16:28 2003 @@ -1,9 +1,8 @@ PHP 4 NEWS ||| ?? ??? 2003, Version 4.3.5 -- Fixed header handler in NSAPI SAPI (header-replace was ignored, - send_default_content_type now sends value from php.ini). - (Uwe Schindler) +- Fixed header handler in NSAPI SAPI module (header-replace was ignored, + send_default_content_type now sends value from php.ini). (Uwe Schindler) - Fixed bug #26025 (Segfault on glob() without GLOB_NOCHECK or GLOB_NOMAGIC under *BSD platforms). (Moriyoshi) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/simplexml simplexml.c
Do these changes (the ones you made later too) fix any of the bugs reported at bugs.php.net ? (all 3 assigned to you) --Jani On Mon, 3 Nov 2003, Sterling Hughes wrote: sterling Mon Nov 3 08:36:24 2003 EDT Modified files: /php-src/ext/simplexml simplexml.c Log: - Stop a crash in xpath - Remove the ability to access attributes via the - operator, attributes are accessed via the array indicators Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.78 php-src/ext/simplexml/simplexml.c:1.79 --- php-src/ext/simplexml/simplexml.c:1.78 Wed Oct 29 13:04:24 2003 +++ php-src/ext/simplexml/simplexml.c Mon Nov 3 08:36:23 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: simplexml.c,v 1.78 2003/10/29 18:04:24 moriyoshi Exp $ */ +/* $Id: simplexml.c,v 1.79 2003/11/03 13:36:23 sterling Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -227,7 +227,7 @@ static zval * sxe_property_read(zval *object, zval *member, zend_bool silent TSRMLS_DC) { - return sxe_prop_dim_read(object, member, 1, 1, silent TSRMLS_CC); + return sxe_prop_dim_read(object, member, 1, 0, silent TSRMLS_CC); } /* }}} */ @@ -634,6 +634,7 @@ char *query; intquery_len; inti; + xmlXPathObjectPtr retval; xmlNodeSetPtr result; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, query, query_len) == FAILURE) { @@ -650,7 +651,13 @@ sxe-xpath-node = sxe-node-node; - result = xmlXPathEval(query, sxe-xpath)-nodesetval; + retval = xmlXPathEval(query, sxe-xpath); + if (!retval) { + RETURN_FALSE; + } + + + result = retval-nodesetval; if (!result) { RETURN_FALSE; } @@ -1393,7 +1400,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, Simplexml support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.78 $); + php_info_print_table_row(2, Revision, $Revision: 1.79 $); php_info_print_table_row(2, Schema support, #ifdef LIBXML_SCHEMAS_ENABLED enabled); -- https://www.paypal.com/xclick/[EMAIL PROTECTED]no_note=1tax=0currency_code=EUR -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mbstring/libmbfl .cvsignore
sniper Mon Nov 3 18:36:06 2003 EDT Modified files: /php-src/ext/mbstring/libmbfl .cvsignore Log: Missing file Index: php-src/ext/mbstring/libmbfl/.cvsignore diff -u php-src/ext/mbstring/libmbfl/.cvsignore:1.4 php-src/ext/mbstring/libmbfl/.cvsignore:1.5 --- php-src/ext/mbstring/libmbfl/.cvsignore:1.4 Tue Oct 28 10:24:02 2003 +++ php-src/ext/mbstring/libmbfl/.cvsignore Mon Nov 3 18:36:05 2003 @@ -4,6 +4,7 @@ Makefile.in autoscan.log configure +config.h config.sub config.log config.guess -- 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 image.c
iliaa Mon Nov 3 20:38:34 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/standard image.c Log: MFH: Fixed bug #25581 (getimagesize () return incorrect values on bitmap (os2) files). Index: php-src/ext/standard/image.c diff -u php-src/ext/standard/image.c:1.72.2.11 php-src/ext/standard/image.c:1.72.2.12 --- php-src/ext/standard/image.c:1.72.2.11 Tue Sep 9 15:27:41 2003 +++ php-src/ext/standard/image.cMon Nov 3 20:38:33 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: image.c,v 1.72.2.11 2003/09/09 19:27:41 sniper Exp $ */ +/* $Id: image.c,v 1.72.2.12 2003/11/04 01:38:33 iliaa Exp $ */ #include php.h #include stdio.h @@ -143,18 +143,29 @@ static struct gfxinfo *php_handle_bmp (php_stream * stream TSRMLS_DC) { struct gfxinfo *result = NULL; - unsigned char dim[12]; + unsigned char dim[16]; + int size; - if (php_stream_seek(stream, 15, SEEK_CUR)) + if (php_stream_seek(stream, 11, SEEK_CUR)) return NULL; if (php_stream_read(stream, dim, sizeof(dim)) != sizeof(dim)) return NULL; - result = (struct gfxinfo *) ecalloc (1, sizeof(struct gfxinfo)); - result-width= (((unsigned int)dim[ 3]) 24) + (((unsigned int)dim[ 2]) 16) + (((unsigned int)dim[ 1]) 8) + ((unsigned int) dim[ 0]); - result-height = (((unsigned int)dim[ 7]) 24) + (((unsigned int)dim[ 6]) 16) + (((unsigned int)dim[ 5]) 8) + ((unsigned int) dim[ 4]); - result-bits = (((unsigned int)dim[11]) 8) + ((unsigned int)dim[10]); + size = (((unsigned int)dim[ 3]) 24) + (((unsigned int)dim[ 2]) 16) + (((unsigned int)dim[ 1]) 8) + ((unsigned int) dim[ 0]); + if (size == 12) { + result = (struct gfxinfo *) ecalloc (1, sizeof(struct gfxinfo)); + result-width= (((unsigned int)dim[ 5]) 8) + ((unsigned int) dim[ 4]); + result-height = (((unsigned int)dim[ 7]) 8) + ((unsigned int) dim[ 6]); + result-bits = ((unsigned int)dim[11]); + } else if (size 12 (size = 64 || size == 108)) { + result = (struct gfxinfo *) ecalloc (1, sizeof(struct gfxinfo)); + result-width= (((unsigned int)dim[ 7]) 24) + (((unsigned int)dim[ 6]) 16) + (((unsigned int)dim[ 5]) 8) + ((unsigned int) dim[ 4]); + result-height = (((unsigned int)dim[11]) 24) + (((unsigned int)dim[10]) 16) + (((unsigned int)dim[ 9]) 8) + ((unsigned int) dim[ 8]); + result-bits = (((unsigned int)dim[15]) 8) + ((unsigned int)dim[14]); + } else { + return NULL; + } return result; } -- 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
iliaa Mon Nov 3 20:40:32 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS Log: Bug fixing news Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.452 php-src/NEWS:1.1247.2.453 --- php-src/NEWS:1.1247.2.452 Mon Nov 3 18:16:28 2003 +++ php-src/NEWSMon Nov 3 20:40:22 2003 @@ -3,8 +3,12 @@ ?? ??? 2003, Version 4.3.5 - Fixed header handler in NSAPI SAPI module (header-replace was ignored, send_default_content_type now sends value from php.ini). (Uwe Schindler) +- Fixed bug #26042 (memory leak if mcrypt_generic_deinit() is not called + after every mcrypt_generic_init() call). (Ilia) - Fixed bug #26025 (Segfault on glob() without GLOB_NOCHECK or GLOB_NOMAGIC under *BSD platforms). (Moriyoshi) +- Fixed bug #25581 (getimagesize () return incorrect values on bitmap + (os2) files). (Marcus) 3 Nov 2003, Version 4.3.4 - Made MCVE extension available on win32. (Jani) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd/libgd gd.c
iliaa Mon Nov 3 20:55:51 2003 EDT Modified files: /php-src/ext/gd/libgd gd.c Log: Fixed bug #26097 (gdImageColorClosestAlpha() returns incorrect results). Index: php-src/ext/gd/libgd/gd.c diff -u php-src/ext/gd/libgd/gd.c:1.66 php-src/ext/gd/libgd/gd.c:1.67 --- php-src/ext/gd/libgd/gd.c:1.66 Mon Sep 8 16:59:36 2003 +++ php-src/ext/gd/libgd/gd.c Mon Nov 3 20:55:50 2003 @@ -255,7 +255,7 @@ gd = im-green[i] - g; bd = im-blue[i] - b; /* gd 2.02: whoops, was - b (thanks to David Marwood) */ - ad = im-blue[i] - a; + ad = im-alpha[i] - a; dist = rd * rd + gd * gd + bd * bd + ad * ad; if (first || (dist mindist)) { mindist = dist; -- 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/gd/libgd gd.c
iliaa Mon Nov 3 20:56:08 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS /php-src/ext/gd/libgd gd.c Log: MFH: Fixed bug #26097 (gdImageColorClosestAlpha() returns incorrect results). Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.453 php-src/NEWS:1.1247.2.454 --- php-src/NEWS:1.1247.2.453 Mon Nov 3 20:40:22 2003 +++ php-src/NEWSMon Nov 3 20:56:06 2003 @@ -3,6 +3,8 @@ ?? ??? 2003, Version 4.3.5 - Fixed header handler in NSAPI SAPI module (header-replace was ignored, send_default_content_type now sends value from php.ini). (Uwe Schindler) +- Fixed bug #26097 (gdImageColorClosestAlpha() returns incorrect results). + (sprice at wisc dot edu, Ilia) - Fixed bug #26042 (memory leak if mcrypt_generic_deinit() is not called after every mcrypt_generic_init() call). (Ilia) - Fixed bug #26025 (Segfault on glob() without GLOB_NOCHECK or GLOB_NOMAGIC Index: php-src/ext/gd/libgd/gd.c diff -u php-src/ext/gd/libgd/gd.c:1.24.2.22 php-src/ext/gd/libgd/gd.c:1.24.2.23 --- php-src/ext/gd/libgd/gd.c:1.24.2.22 Mon Sep 8 17:01:37 2003 +++ php-src/ext/gd/libgd/gd.c Mon Nov 3 20:56:07 2003 @@ -255,7 +255,7 @@ gd = im-green[i] - g; bd = im-blue[i] - b; /* gd 2.02: whoops, was - b (thanks to David Marwood) */ - ad = im-blue[i] - a; + ad = im-alpha[i] - a; dist = rd * rd + gd * gd + bd * bd + ad * ad; if (first || (dist mindist)) { mindist = dist; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mime_magic mime_magic.c mime_magic.dsp php_mime_magic.h phpmimemagic.h
sniper Tue Nov 4 00:15:20 2003 EDT Added files: /php-src/ext/mime_magic phpmimemagic.h Modified files: /php-src/ext/mime_magic mime_magic.c mime_magic.dsp php_mime_magic.h Log: - Moved all the mime_magic.c specific stuff into their own header file to prevent possible compile failures. # Should fix bug #26103 Index: php-src/ext/mime_magic/mime_magic.c diff -u php-src/ext/mime_magic/mime_magic.c:1.33 php-src/ext/mime_magic/mime_magic.c:1.34 --- php-src/ext/mime_magic/mime_magic.c:1.33Mon Oct 20 10:36:51 2003 +++ php-src/ext/mime_magic/mime_magic.c Tue Nov 4 00:15:19 2003 @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe [EMAIL PROTECTED] | +--+ - $Id: mime_magic.c,v 1.33 2003/10/20 14:36:51 iliaa Exp $ + $Id: mime_magic.c,v 1.34 2003/11/04 05:15:19 sniper Exp $ This module contains a lot of stuff taken from Apache mod_mime_magic, so the license section is a little bit longer than usual: @@ -156,6 +156,7 @@ #include php_ini.h #include ext/standard/info.h #include php_mime_magic.h +#include phpmimemagic.h #include fcntl.h #include sys/types.h Index: php-src/ext/mime_magic/mime_magic.dsp diff -u php-src/ext/mime_magic/mime_magic.dsp:1.1 php-src/ext/mime_magic/mime_magic.dsp:1.2 --- php-src/ext/mime_magic/mime_magic.dsp:1.1 Thu Aug 22 09:16:03 2002 +++ php-src/ext/mime_magic/mime_magic.dsp Tue Nov 4 00:15:19 2003 @@ -103,6 +103,10 @@ SOURCE=.\php_mime_magic.h # End Source File +# Begin Source File + +SOURCE=.\phpmimemagic.h +# End Source File # End Group # End Target # End Project Index: php-src/ext/mime_magic/php_mime_magic.h diff -u php-src/ext/mime_magic/php_mime_magic.h:1.8 php-src/ext/mime_magic/php_mime_magic.h:1.9 --- php-src/ext/mime_magic/php_mime_magic.h:1.8 Tue Aug 19 18:13:01 2003 +++ php-src/ext/mime_magic/php_mime_magic.h Tue Nov 4 00:15:19 2003 @@ -15,349 +15,12 @@ | Author: | +--+ - $Id: php_mime_magic.h,v 1.8 2003/08/19 22:13:01 iliaa Exp $ + $Id: php_mime_magic.h,v 1.9 2003/11/04 05:15:19 sniper Exp $ */ #ifndef PHP_MIME_MAGIC_H #define PHP_MIME_MAGIC_H -#define MIME_MAGIC_DEBUG0 - -#define MIME_BINARY_UNKNOWNapplication/octet-stream -#define MIME_TEXT_UNKNOWNtext/plain - -#define MAXMIMESTRING256 - -#define MIME_MAGIC_OK 0 -#define MIME_MAGIC_DECLINED -1 -#define MIME_MAGIC_DONE -2 -#define MIME_MAGIC_ERROR -3 - -#define DIR_MAGIC_TYPE httpd/unix-directory - -/* HOWMANY must be at least 4096 to make gzip -dcq work */ -#define HOWMANY4096 -/* SMALL_HOWMANY limits how much work we do to figure out text files */ -#define SMALL_HOWMANY 1024 -#define MAXDESC50 /* max leng of text description */ -#define MAXstring 64 /* max leng of string types */ - -struct magic { -struct magic *next;/* link to next entry */ -int lineno;/* line number from magic file */ - -short flag; -#define INDIR1 /* if '(...)' appears, */ -#defineUNSIGNED 2 /* comparison is unsigned */ -short cont_level; /* level of */ -struct { - char type; /* byte short long */ - long offset;/* offset from indirection */ -} in; -long offset; /* offset to magic number */ -unsigned char reln;/* relation (0=eq, ''=gt, etc) */ -char type; /* int, short, long or string. */ -char vallen; /* length of string value, if any */ -union VALUETYPE { - unsigned char b; - unsigned short h; - unsigned long l; - char s[MAXstring]; - unsigned char hs[2];/* 2 bytes of a fixed-endian short */ - unsigned char hl[4];/* 2 bytes of a fixed-endian long */ -} value; /* either number or string */ -unsigned long mask;/* mask before comparison with value */ -char nospflag; /* supress space character */ - -/* NOTE: this string is suspected of overrunning - find it! */ -char desc[MAXDESC];/* description */ -}; - -/* - * data structures for tar file recognition - * -- - * Header file for public domain tar (tape archive) program. - * - * @(#)tar.h 1.20 86/10/29Public Domain. Created 25 August 1985 by John - * Gilmore, ihnp4!hoptoad!gnu. - * - * Header block on tape. - * - * I'm going to use traditional DP naming conventions here. A block is a big - * chunk of stuff that we do I/O on. A record is a piece of info that we - * care about.
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mime_magic mime_magic.c mime_magic.dsp php_mime_magic.h phpmimemagic.h
sniper Tue Nov 4 00:15:56 2003 EDT Added files: (Branch: PHP_4_3) /php-src/ext/mime_magic phpmimemagic.h Modified files: /php-src/ext/mime_magic mime_magic.c mime_magic.dsp php_mime_magic.h Log: MFH: Possible fix for bug #26103 Index: php-src/ext/mime_magic/mime_magic.c diff -u php-src/ext/mime_magic/mime_magic.c:1.13.2.10 php-src/ext/mime_magic/mime_magic.c:1.13.2.11 --- php-src/ext/mime_magic/mime_magic.c:1.13.2.10 Mon Oct 20 10:37:02 2003 +++ php-src/ext/mime_magic/mime_magic.c Tue Nov 4 00:15:55 2003 @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe [EMAIL PROTECTED] | +--+ - $Id: mime_magic.c,v 1.13.2.10 2003/10/20 14:37:02 iliaa Exp $ + $Id: mime_magic.c,v 1.13.2.11 2003/11/04 05:15:55 sniper Exp $ This module contains a lot of stuff taken from Apache mod_mime_magic, so the license section is a little bit longer than usual: @@ -156,6 +156,7 @@ #include php_ini.h #include ext/standard/info.h #include php_mime_magic.h +#include phpmimemagic.h #include fcntl.h #include sys/types.h Index: php-src/ext/mime_magic/mime_magic.dsp diff -u php-src/ext/mime_magic/mime_magic.dsp:1.1 php-src/ext/mime_magic/mime_magic.dsp:1.1.4.1 --- php-src/ext/mime_magic/mime_magic.dsp:1.1 Thu Aug 22 09:16:03 2002 +++ php-src/ext/mime_magic/mime_magic.dsp Tue Nov 4 00:15:55 2003 @@ -103,6 +103,10 @@ SOURCE=.\php_mime_magic.h # End Source File +# Begin Source File + +SOURCE=.\phpmimemagic.h +# End Source File # End Group # End Target # End Project Index: php-src/ext/mime_magic/php_mime_magic.h diff -u php-src/ext/mime_magic/php_mime_magic.h:1.4.4.1 php-src/ext/mime_magic/php_mime_magic.h:1.4.4.2 --- php-src/ext/mime_magic/php_mime_magic.h:1.4.4.1 Tue Dec 31 11:34:54 2002 +++ php-src/ext/mime_magic/php_mime_magic.h Tue Nov 4 00:15:55 2003 @@ -15,360 +15,12 @@ | Author: | +--+ - $Id: php_mime_magic.h,v 1.4.4.1 2002/12/31 16:34:54 sebastian Exp $ + $Id: php_mime_magic.h,v 1.4.4.2 2003/11/04 05:15:55 sniper Exp $ */ #ifndef PHP_MIME_MAGIC_H #define PHP_MIME_MAGIC_H -#define MIME_MAGIC_DEBUG0 - -#define MIME_BINARY_UNKNOWNapplication/octet-stream -#define MIME_TEXT_UNKNOWNtext/plain - -#define MAXMIMESTRING256 - -#define MIME_MAGIC_OK 0 -#define MIME_MAGIC_DECLINED -1 -#define MIME_MAGIC_DONE -2 -#define MIME_MAGIC_ERROR -3 - -#define DIR_MAGIC_TYPE httpd/unix-directory - -/* HOWMANY must be at least 4096 to make gzip -dcq work */ -#define HOWMANY4096 -/* SMALL_HOWMANY limits how much work we do to figure out text files */ -#define SMALL_HOWMANY 1024 -#define MAXDESC50 /* max leng of text description */ -#define MAXstring 64 /* max leng of string types */ - -struct magic { -struct magic *next;/* link to next entry */ -int lineno;/* line number from magic file */ - -short flag; -#define INDIR1 /* if '(...)' appears, */ -#defineUNSIGNED 2 /* comparison is unsigned */ -short cont_level; /* level of */ -struct { - char type; /* byte short long */ - long offset;/* offset from indirection */ -} in; -long offset; /* offset to magic number */ -unsigned char reln;/* relation (0=eq, ''=gt, etc) */ -char type; /* int, short, long or string. */ -char vallen; /* length of string value, if any */ -#define BYTE1 -#define SHORT2 -#define LONG4 -#define STRING5 -#define DATE6 -#define BESHORT7 -#define BELONG8 -#define BEDATE9 -#define LESHORT10 -#define LELONG11 -#define LEDATE12 -union VALUETYPE { - unsigned char b; - unsigned short h; - unsigned long l; - char s[MAXstring]; - unsigned char hs[2];/* 2 bytes of a fixed-endian short */ - unsigned char hl[4];/* 2 bytes of a fixed-endian long */ -} value; /* either number or string */ -unsigned long mask;/* mask before comparison with value */ -char nospflag; /* supress space character */ - -/* NOTE: this string is suspected of overrunning - find it! */ -char desc[MAXDESC];/* description */ -}; - -/* - * data structures for tar file recognition - * -- - * Header file for public domain tar (tape archive) program. - * - * @(#)tar.h 1.20 86/10/29Public Domain. Created 25 August 1985 by John - * Gilmore, ihnp4!hoptoad!gnu. - * - * Header
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/dbase dbase.c
sniper Tue Nov 4 01:09:21 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/dbase dbase.c Log: MFH: - limit writing of field data to field len + 1 This fixed many memory overrun errors which appeared in several scripts when writing a record. by: Uwe Steinmann [EMAIL PROTECTED] Index: php-src/ext/dbase/dbase.c diff -u php-src/ext/dbase/dbase.c:1.60.2.2 php-src/ext/dbase/dbase.c:1.60.2.3 --- php-src/ext/dbase/dbase.c:1.60.2.2 Sun Sep 21 11:40:28 2003 +++ php-src/ext/dbase/dbase.c Tue Nov 4 01:09:19 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dbase.c,v 1.60.2.2 2003/09/21 15:40:28 sniper Exp $ */ +/* $Id: dbase.c,v 1.60.2.3 2003/11/04 06:09:19 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -298,7 +298,7 @@ tmp = **field; zval_copy_ctor(tmp); convert_to_string(tmp); - sprintf(t_cp, cur_f-db_format, Z_STRVAL(tmp)); + snprintf(t_cp, cur_f-db_flen+1, cur_f-db_format, Z_STRVAL(tmp)); zval_dtor(tmp); t_cp += cur_f-db_flen; } @@ -310,7 +310,7 @@ RETURN_FALSE; } -put_dbf_info(dbh); + put_dbf_info(dbh); efree(cp); RETURN_TRUE; @@ -369,7 +369,7 @@ RETURN_FALSE; } convert_to_string_ex(field); - sprintf(t_cp, cur_f-db_format, Z_STRVAL_PP(field)); + snprintf(t_cp, cur_f-db_flen+1, cur_f-db_format, Z_STRVAL_PP(field)); t_cp += cur_f-db_flen; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php