[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard head.c

2007-02-25 Thread Ilia Alshanetsky
iliaa   Mon Feb 26 02:12:36 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   head.c 
  Log:
  
  Revert previous commit that caused a buffer overflow (Bug #40634)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/head.c?r1=1.84.2.1.2.6&r2=1.84.2.1.2.7&diff_format=u
Index: php-src/ext/standard/head.c
diff -u php-src/ext/standard/head.c:1.84.2.1.2.6 
php-src/ext/standard/head.c:1.84.2.1.2.7
--- php-src/ext/standard/head.c:1.84.2.1.2.6Sat Feb 24 02:17:27 2007
+++ php-src/ext/standard/head.c Mon Feb 26 02:12:36 2007
@@ -15,7 +15,7 @@
| Author: Rasmus Lerdorf <[EMAIL PROTECTED]>|
+--+
  */
-/* $Id: head.c,v 1.84.2.1.2.6 2007/02/24 02:17:27 helly Exp $ */
+/* $Id: head.c,v 1.84.2.1.2.7 2007/02/26 02:12:36 iliaa Exp $ */
 
 #include 
 #include "php.h"
@@ -94,6 +94,9 @@
if (domain) {
len += domain_len;
}
+
+   cookie = emalloc(len + 100);
+
if (value && value_len == 0) {
/* 
 * MSIE doesn't delete a cookie when you set it to a null value
@@ -102,10 +105,10 @@
 */
time_t t = time(NULL) - 31536001;
dt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s 
T")-1, t, 0 TSRMLS_CC);
-   spprintf(&cookie, 0, "Set-Cookie: %s=deleted; expires=%s", 
name, dt);
+   snprintf(cookie, len + 100, "Set-Cookie: %s=deleted; 
expires=%s", name, dt);
efree(dt);
} else {
-   spprintf(&cookie, 0, "Set-Cookie: %s=%s", name, value ? 
encoded_value : "");
+   snprintf(cookie, len + 100, "Set-Cookie: %s=%s", name, value ? 
encoded_value : "");
if (expires > 0) {
strlcat(cookie, "; expires=", len + 100);
dt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, 
d-M-Y H:i:s T")-1, expires, 0 TSRMLS_CC);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/dbase dbase.c /ext/dbase/tests 001.phpt

2007-02-25 Thread Antony Dovgal
tony2001Sun Feb 25 23:17:12 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/dbase  dbase.c 
/php-src/ext/dbase/tests001.phpt 
  Log:
  MFH: do not allow db without fields
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dbase/dbase.c?r1=1.74.2.2.2.8&r2=1.74.2.2.2.9&diff_format=u
Index: php-src/ext/dbase/dbase.c
diff -u php-src/ext/dbase/dbase.c:1.74.2.2.2.8 
php-src/ext/dbase/dbase.c:1.74.2.2.2.9
--- php-src/ext/dbase/dbase.c:1.74.2.2.2.8  Mon Jan  1 09:36:00 2007
+++ php-src/ext/dbase/dbase.c   Sun Feb 25 23:17:12 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dbase.c,v 1.74.2.2.2.8 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: dbase.c,v 1.74.2.2.2.9 2007/02/25 23:17:12 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -621,6 +621,11 @@
 
num_fields = zend_hash_num_elements(Z_ARRVAL_PP(fields));
 
+   if (num_fields <= 0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create 
database without fields");
+   RETURN_FALSE;
+   }
+
/* have to use regular malloc() because this gets free()d by
   code in the dbase library */
dbh = (dbhead_t *)malloc(sizeof(dbhead_t));
http://cvs.php.net/viewvc.cgi/php-src/ext/dbase/tests/001.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/dbase/tests/001.phpt
diff -u php-src/ext/dbase/tests/001.phpt:1.1.2.1 
php-src/ext/dbase/tests/001.phpt:1.1.2.2
--- php-src/ext/dbase/tests/001.phpt:1.1.2.1Wed Jul 12 13:08:38 2006
+++ php-src/ext/dbase/tests/001.phptSun Feb 25 23:17:12 2007
@@ -51,7 +51,9 @@
 
 Warning: dbase_create(): expected field name as first element of list in field 
0 in %s on line %d
 bool(false)
-int(%d)
+
+Warning: dbase_create(): Unable to create database without fields in %s on 
line %d
+bool(false)
 
 Warning: dbase_create(): Expected array as second parameter in %s on line %d
 bool(false)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/dbase dbase.c /ext/dbase/tests 001.phpt 002.phpt

2007-02-25 Thread Antony Dovgal
tony2001Sun Feb 25 23:16:32 2007 UTC

  Modified files:  
/php-src/ext/dbase  dbase.c 
/php-src/ext/dbase/tests001.phpt 002.phpt 
  Log:
  do not allow db without fields
  fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dbase/dbase.c?r1=1.87&r2=1.88&diff_format=u
Index: php-src/ext/dbase/dbase.c
diff -u php-src/ext/dbase/dbase.c:1.87 php-src/ext/dbase/dbase.c:1.88
--- php-src/ext/dbase/dbase.c:1.87  Mon Jan  1 09:29:23 2007
+++ php-src/ext/dbase/dbase.c   Sun Feb 25 23:16:32 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dbase.c,v 1.87 2007/01/01 09:29:23 sebastian Exp $ */
+/* $Id: dbase.c,v 1.88 2007/02/25 23:16:32 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -604,6 +604,11 @@
 
num_fields = zend_hash_num_elements(Z_ARRVAL_PP(fields));
 
+   if (num_fields <= 0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create 
database without fields");
+   RETURN_FALSE;
+   }
+
/* have to use regular malloc() because this gets free()d by
   code in the dbase library */
dbh = (dbhead_t *)malloc(sizeof(dbhead_t));
http://cvs.php.net/viewvc.cgi/php-src/ext/dbase/tests/001.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/dbase/tests/001.phpt
diff -u php-src/ext/dbase/tests/001.phpt:1.2 
php-src/ext/dbase/tests/001.phpt:1.3
--- php-src/ext/dbase/tests/001.phpt:1.2Wed Jul 12 13:17:25 2006
+++ php-src/ext/dbase/tests/001.phptSun Feb 25 23:16:32 2007
@@ -54,7 +54,8 @@
 int(%d)
 string(71) "dbase_create(): expected field name as first element of list in 
field 0"
 bool(false)
-int(%d)
+string(56) "dbase_create(): Unable to create database without fields"
+bool(false)
 string(67) "Argument 2 passed to dbase_create() must be an array, integer 
given"
 string(50) "dbase_create(): Expected array as second parameter"
 bool(false)
http://cvs.php.net/viewvc.cgi/php-src/ext/dbase/tests/002.phpt?r1=1.4&r2=1.5&diff_format=u
Index: php-src/ext/dbase/tests/002.phpt
diff -u php-src/ext/dbase/tests/002.phpt:1.4 
php-src/ext/dbase/tests/002.phpt:1.5
--- php-src/ext/dbase/tests/002.phpt:1.4Fri Dec  1 19:10:59 2006
+++ php-src/ext/dbase/tests/002.phptSun Feb 25 23:16:32 2007
@@ -35,7 +35,7 @@
 echo "Done\n";
 ?>
 --EXPECTF--
-Warning: dbase_open(): Invalid access mode -1 %s in %s on line %d
+Warning: dbase_open(): Invalid access mode -1 in %s on line %d
 bool(false)
 
 Warning: dbase_open(): Invalid access mode 1000 in %s on line %d

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/sockets sockets.c

2007-02-25 Thread Antony Dovgal
tony2001Sun Feb 25 22:59:33 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/socketssockets.c 
  Log:
  MFH: zerofill socket structs
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.171.2.9.2.7&r2=1.171.2.9.2.8&diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.171.2.9.2.7 
php-src/ext/sockets/sockets.c:1.171.2.9.2.8
--- php-src/ext/sockets/sockets.c:1.171.2.9.2.7 Wed Jan 10 15:25:07 2007
+++ php-src/ext/sockets/sockets.c   Sun Feb 25 22:59:32 2007
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: sockets.c,v 1.171.2.9.2.7 2007/01/10 15:25:07 bjori Exp $ */
+/* $Id: sockets.c,v 1.171.2.9.2.8 2007/02/25 22:59:32 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1118,6 +1118,8 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"Socket of type AF_INET6 requires 3 arguments");
RETURN_FALSE;
}
+   
+   memset(&sin6, 0, sizeof(struct sockaddr_in6));
 
sin6.sin6_family = AF_INET6;
sin6.sin6_port   = htons((unsigned short int)port);
@@ -1134,6 +1136,8 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"Socket of type AF_INET requires 3 arguments");
RETURN_FALSE;
}
+   
+   memset(&sin, 0, sizeof(struct sockaddr_in));
 
sin.sin_family = AF_INET;
sin.sin_port   = htons((unsigned short int)port);
@@ -1146,6 +1150,8 @@
break;
 
case AF_UNIX:
+   memset(&s_un, 0, sizeof(struct sockaddr_un));
+   
s_un.sun_family = AF_UNIX;
snprintf(s_un.sun_path, 108, "%s", addr);
retval = connect(php_sock->bsd_socket, (struct sockaddr 
*) &s_un, SUN_LEN(&s_un));

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/sockets sockets.c

2007-02-25 Thread Antony Dovgal
tony2001Sun Feb 25 22:58:57 2007 UTC

  Modified files:  
/php-src/ext/socketssockets.c 
  Log:
  zerofill socket structs
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.188&r2=1.189&diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.188 php-src/ext/sockets/sockets.c:1.189
--- php-src/ext/sockets/sockets.c:1.188 Wed Jan 10 21:26:09 2007
+++ php-src/ext/sockets/sockets.c   Sun Feb 25 22:58:57 2007
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: sockets.c,v 1.188 2007/01/10 21:26:09 bjori Exp $ */
+/* $Id: sockets.c,v 1.189 2007/02/25 22:58:57 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1138,6 +1138,8 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"Socket of type AF_INET6 requires 3 arguments");
RETURN_FALSE;
}
+   
+   memset(&sin6, 0, sizeof(struct sockaddr_in6));
 
sin6.sin6_family = AF_INET6;
sin6.sin6_port   = htons((unsigned short int)port);
@@ -1154,6 +1156,8 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"Socket of type AF_INET requires 3 arguments");
RETURN_FALSE;
}
+   
+   memset(&sin, 0, sizeof(struct sockaddr_in));
 
sin.sin_family = AF_INET;
sin.sin_port   = htons((unsigned short int)port);
@@ -1166,6 +1170,8 @@
break;
 
case AF_UNIX:
+   memset(&s_un, 0, sizeof(struct sockaddr_un));
+   
s_un.sun_family = AF_UNIX;
snprintf(s_un.sun_path, 108, "%s", addr);
retval = connect(php_sock->bsd_socket, (struct sockaddr 
*) &s_un, SUN_LEN(&s_un));

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_4_4) /main php_compat.h

2007-02-25 Thread Nuno Lopes
nlopess Sun Feb 25 18:50:16 2007 UTC

  Modified files:  (Branch: PHP_4_4)
/php-src/main   php_compat.h 
  Log:
  MFH: update PCRE symbols list
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_compat.h?r1=1.11.4.6.2.3&r2=1.11.4.6.2.4&diff_format=u
Index: php-src/main/php_compat.h
diff -u php-src/main/php_compat.h:1.11.4.6.2.3 
php-src/main/php_compat.h:1.11.4.6.2.4
--- php-src/main/php_compat.h:1.11.4.6.2.3  Wed Aug 23 20:40:39 2006
+++ php-src/main/php_compat.h   Sun Feb 25 18:50:16 2007
@@ -12,7 +12,7 @@
 #define pcre_compile2  php_pcre_compile2
 #define pcre_copy_substringphp_pcre_copy_substring
 #define pcre_exec  php_pcre_exec
-#define pcre_get_substring php_pcre_substring
+#define pcre_get_substring php_pcre_get_substring
 #define pcre_get_substring_listphp_pcre_get_substring_list
 #define pcre_info  php_pcre_info
 #define pcre_maketablesphp_pcre_maketables
@@ -23,7 +23,6 @@
 #define pcre_mallocphp_pcre_malloc
 #define pcre_configphp_pcre_config
 #define pcre_copy_named_substring php_pcre_copy_named_substring
-#define pcre_dfa_exec  php_pcre_dfa_exec
 #define pcre_free_substringphp_pcre_free_substring
 #define pcre_free_substring_list php_pcre_free_substring_list
 #define pcre_get_named_substring php_pcre_get_named_substring
@@ -35,6 +34,22 @@
 #define _pcre_ucp_othercasephp__pcre_ucp_othercase
 #define _pcre_valid_utf8   php__pcre_valid_utf8
 #define _pcre_xclass   php__pcre_xclass
+#define pcre_callout   php_pcre_callout
+#define _pcre_OP_lengths   php__pcre_OP_lengths
+/* this one doesn't work because pcre.h isn't included from the 
pcre_chartables.c file
+#define _pcre_default_tables   php__pcre_default_tables */
+#define pcre_get_stringtable_entries   php_pcre_get_stringtable_entries
+#define _pcre_is_newline   php__pcre_is_newline
+#define pcre_stack_freephp_pcre_stack_free
+#define pcre_stack_malloc  php_pcre_stack_malloc
+#define _pcre_utf8_table1  php__pcre_utf8_table1
+#define _pcre_utf8_table1_size php__pcre_utf8_table1_size
+#define _pcre_utf8_table2  php__pcre_utf8_table2
+#define _pcre_utf8_table3  php__pcre_utf8_table3
+#define _pcre_utf8_table4  php__pcre_utf8_table4
+#define _pcre_utt  php__pcre_utt
+#define _pcre_utt_size php__pcre_utt_size
+#define _pcre_was_newline  php__pcre_was_newline
 #endif
 
 #define lookup php_lookup

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /main php_compat.h

2007-02-25 Thread Nuno Lopes
nlopess Sun Feb 25 18:48:19 2007 UTC

  Modified files:  
/php-src/main   php_compat.h 
  Log:
  MFB: update pcre symbol list
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_compat.h?r1=1.31&r2=1.32&diff_format=u
Index: php-src/main/php_compat.h
diff -u php-src/main/php_compat.h:1.31 php-src/main/php_compat.h:1.32
--- php-src/main/php_compat.h:1.31  Mon Jan  1 09:29:35 2007
+++ php-src/main/php_compat.h   Sun Feb 25 18:48:19 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_compat.h,v 1.31 2007/01/01 09:29:35 sebastian Exp $ */
+/* $Id: php_compat.h,v 1.32 2007/02/25 18:48:19 nlopess Exp $ */
 
 #ifndef PHP_COMPAT_H
 #define PHP_COMPAT_H
@@ -32,7 +32,7 @@
 #define pcre_compile2  php_pcre_compile2
 #define pcre_copy_substringphp_pcre_copy_substring
 #define pcre_exec  php_pcre_exec
-#define pcre_get_substring php_pcre_substring
+#define pcre_get_substring php_pcre_get_substring
 #define pcre_get_substring_listphp_pcre_get_substring_list
 #define pcre_info  php_pcre_info
 #define pcre_maketablesphp_pcre_maketables
@@ -43,7 +43,6 @@
 #define pcre_mallocphp_pcre_malloc
 #define pcre_configphp_pcre_config
 #define pcre_copy_named_substring php_pcre_copy_named_substring
-#define pcre_dfa_exec  php_pcre_dfa_exec
 #define pcre_free_substringphp_pcre_free_substring
 #define pcre_free_substring_list php_pcre_free_substring_list
 #define pcre_get_named_substring php_pcre_get_named_substring
@@ -55,6 +54,22 @@
 #define _pcre_ucp_othercasephp__pcre_ucp_othercase
 #define _pcre_valid_utf8   php__pcre_valid_utf8
 #define _pcre_xclass   php__pcre_xclass
+#define pcre_callout   php_pcre_callout
+#define _pcre_OP_lengths   php__pcre_OP_lengths
+/* this one doesn't work because pcre.h isn't included from the 
pcre_chartables.c file
+#define _pcre_default_tables   php__pcre_default_tables */
+#define pcre_get_stringtable_entries   php_pcre_get_stringtable_entries
+#define _pcre_is_newline   php__pcre_is_newline
+#define pcre_stack_freephp_pcre_stack_free
+#define pcre_stack_malloc  php_pcre_stack_malloc
+#define _pcre_utf8_table1  php__pcre_utf8_table1
+#define _pcre_utf8_table1_size php__pcre_utf8_table1_size
+#define _pcre_utf8_table2  php__pcre_utf8_table2
+#define _pcre_utf8_table3  php__pcre_utf8_table3
+#define _pcre_utf8_table4  php__pcre_utf8_table4
+#define _pcre_utt  php__pcre_utt
+#define _pcre_utt_size php__pcre_utt_size
+#define _pcre_was_newline  php__pcre_was_newline
 #endif
 
 #define lookup php_lookup

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /main php_compat.h

2007-02-25 Thread Nuno Lopes
nlopess Sun Feb 25 18:47:21 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main   php_compat.h 
  Log:
  update pcre symbols list
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_compat.h?r1=1.25.2.3.2.3&r2=1.25.2.3.2.4&diff_format=u
Index: php-src/main/php_compat.h
diff -u php-src/main/php_compat.h:1.25.2.3.2.3 
php-src/main/php_compat.h:1.25.2.3.2.4
--- php-src/main/php_compat.h:1.25.2.3.2.3  Mon Jan  1 09:36:11 2007
+++ php-src/main/php_compat.h   Sun Feb 25 18:47:21 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_compat.h,v 1.25.2.3.2.3 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: php_compat.h,v 1.25.2.3.2.4 2007/02/25 18:47:21 nlopess Exp $ */
 
 #ifndef PHP_COMPAT_H
 #define PHP_COMPAT_H
@@ -32,7 +32,7 @@
 #define pcre_compile2  php_pcre_compile2
 #define pcre_copy_substringphp_pcre_copy_substring
 #define pcre_exec  php_pcre_exec
-#define pcre_get_substring php_pcre_substring
+#define pcre_get_substring php_pcre_get_substring
 #define pcre_get_substring_listphp_pcre_get_substring_list
 #define pcre_info  php_pcre_info
 #define pcre_maketablesphp_pcre_maketables
@@ -43,7 +43,6 @@
 #define pcre_mallocphp_pcre_malloc
 #define pcre_configphp_pcre_config
 #define pcre_copy_named_substring php_pcre_copy_named_substring
-#define pcre_dfa_exec  php_pcre_dfa_exec
 #define pcre_free_substringphp_pcre_free_substring
 #define pcre_free_substring_list php_pcre_free_substring_list
 #define pcre_get_named_substring php_pcre_get_named_substring
@@ -55,6 +54,22 @@
 #define _pcre_ucp_othercasephp__pcre_ucp_othercase
 #define _pcre_valid_utf8   php__pcre_valid_utf8
 #define _pcre_xclass   php__pcre_xclass
+#define pcre_callout   php_pcre_callout
+#define _pcre_OP_lengths   php__pcre_OP_lengths
+/* this one doesn't work because pcre.h isn't included from the 
pcre_chartables.c file
+#define _pcre_default_tables   php__pcre_default_tables */
+#define pcre_get_stringtable_entries   php_pcre_get_stringtable_entries
+#define _pcre_is_newline   php__pcre_is_newline
+#define pcre_stack_freephp_pcre_stack_free
+#define pcre_stack_malloc  php_pcre_stack_malloc
+#define _pcre_utf8_table1  php__pcre_utf8_table1
+#define _pcre_utf8_table1_size php__pcre_utf8_table1_size
+#define _pcre_utf8_table2  php__pcre_utf8_table2
+#define _pcre_utf8_table3  php__pcre_utf8_table3
+#define _pcre_utf8_table4  php__pcre_utf8_table4
+#define _pcre_utt  php__pcre_utt
+#define _pcre_utt_size php__pcre_utt_size
+#define _pcre_was_newline  php__pcre_was_newline
 #endif
 
 #define lookup php_lookup

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/soap php_encoding.c /ext/soap/tests/bugs bug40609.phpt bug40609.wsdl

2007-02-25 Thread Dmitry Stogov
dmitry  Sun Feb 25 13:24:25 2007 UTC

  Modified files:  
/php-src/ext/soap   php_encoding.c 
/php-src/ext/soap/tests/bugsbug40609.phpt bug40609.wsdl 
  Log:
  Fixed bug #40609 (Segfaults when using more than one SoapVar in a request). 
(Rob, Dmitry)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.153&r2=1.154&diff_format=u
Index: php-src/ext/soap/php_encoding.c
diff -u php-src/ext/soap/php_encoding.c:1.153 
php-src/ext/soap/php_encoding.c:1.154
--- php-src/ext/soap/php_encoding.c:1.153   Sat Feb 24 16:25:55 2007
+++ php-src/ext/soap/php_encoding.c Sun Feb 25 13:24:25 2007
@@ -17,7 +17,7 @@
   |  Dmitry Stogov <[EMAIL PROTECTED]> |
   +--+
 */
-/* $Id: php_encoding.c,v 1.153 2007/02/24 16:25:55 helly Exp $ */
+/* $Id: php_encoding.c,v 1.154 2007/02/25 13:24:25 dmitry Exp $ */
 
 #include 
 
@@ -2876,8 +2876,18 @@
ret = xmlNewTextLen(BAD_CAST(Z_STRVAL(tmp)), Z_STRLEN(tmp));
zval_dtor(&tmp);
}
+
ret->name = xmlStringTextNoenc;
-   xmlAddChild(parent, ret);
+   ret->parent = parent;
+   ret->doc = parent->doc;
+   ret->prev = parent->last;
+   ret->next = NULL;
+   if (parent->last) {
+   parent->last->next = ret;
+   } else {
+   parent->children = ret;
+   }
+   parent->last = ret;
 
return ret;
 }
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug40609.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/soap/tests/bugs/bug40609.phpt
diff -u /dev/null php-src/ext/soap/tests/bugs/bug40609.phpt:1.2
--- /dev/null   Sun Feb 25 13:24:25 2007
+++ php-src/ext/soap/tests/bugs/bug40609.phpt   Sun Feb 25 13:24:25 2007
@@ -0,0 +1,21 @@
+--TEST--
+Bug #40609 (Segfaults when using more than one SoapVar in a request)
+--SKIPIF--
+
+--INI--
+soap.wsdl_cache_enabled=0
+--FILE--
+ 1,' 
exceptions' => 0));
+
+$c->update(array('symbol' => new SoapVar("MSFT", XSD_ANYXML),
+ 'price' =>  new SoapVar("1000", XSD_ANYXML)));
+echo $c->__getLastRequest();
+echo "ok\n";
+?>
+--EXPECT--
+
+http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="http://quickstart.samples/xsd";>MSFT1000
+ok
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug40609.wsdl?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/soap/tests/bugs/bug40609.wsdl
diff -u /dev/null php-src/ext/soap/tests/bugs/bug40609.wsdl:1.2
--- /dev/null   Sun Feb 25 13:24:25 2007
+++ php-src/ext/soap/tests/bugs/bug40609.wsdl   Sun Feb 25 13:24:25 2007
@@ -0,0 +1,26 @@
+http://quickstart.samples/"; 
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; 
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"; 
xmlns:ns="http://quickstart.samples/xsd"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
targetNamespace="http://quickstart.samples/";>
+Stock Quote Service
+http://www.w3.org/2001/XMLSchema"; attributeFormDefault="qualified" 
elementFormDefault="qualified" targetNamespace="http://quickstart.samples/xsd";>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+http://www.w3.org/2006/05/addressing/wsdl"; 
message="axis2:updateMessage" wsaw:Action="urn:update" 
/>http://www.w3.org/2006/05/addressing/wsdl"; 
message="axis2:getPriceMessage" wsaw:Action="urn:getPrice" />http://www.w3.org/2006/05/addressing/wsdl"; 
message="axis2:getPriceResponseMessage" 
wsaw:Action="http://quickstart.samples/StockQuoteServicePortType/getPriceResponse";
 />http://schemas.xmlsoap.org/soap/http"; style="document" 
/>http://schemas.xmlsoap.org/soap/http"; style="document" 
/>
http://bluelines.org:8080/axis2/services/StockQuoteService"; 
/>http://bluelines.org:8080/axis2/services/StockQuoteService"; 
/>
\ No newline at end of file

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/soap php_encoding.c /ext/soap/tests/bugs bug40609.phpt bug40609.wsdl

2007-02-25 Thread Dmitry Stogov
dmitry  Sun Feb 25 13:19:29 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/soap/tests/bugsbug40609.phpt bug40609.wsdl 

  Modified files:  
/php-srcNEWS 
/php-src/ext/soap   php_encoding.c 
  Log:
  Fixed bug #40609 (Segfaults when using more than one SoapVar in a request). 
(Rob, Dmitry)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.561&r2=1.2027.2.547.2.562&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.561 php-src/NEWS:1.2027.2.547.2.562
--- php-src/NEWS:1.2027.2.547.2.561 Sat Feb 24 21:30:56 2007
+++ php-src/NEWSSun Feb 25 13:19:28 2007
@@ -10,6 +10,8 @@
 - Added tidyNode::getParent() method (John, Nuno)
 - Fixed zend_llist_remove_tail (Michael Wallner, Dmitry)
 - Fixed bug #40621 (Crash when constructor called inappropriately). (Tony)
+- Fixed bug #40609 (Segfaults when using more than one SoapVar in a request).
+  (Rob, Dmitry)
 - Fixed bug #40606 (umask is not being restored when request is finished). 
   (Tony)
 - Fixed bug #40598 (libxml segfault). (Rob)
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.103.2.21.2.23&r2=1.103.2.21.2.24&diff_format=u
Index: php-src/ext/soap/php_encoding.c
diff -u php-src/ext/soap/php_encoding.c:1.103.2.21.2.23 
php-src/ext/soap/php_encoding.c:1.103.2.21.2.24
--- php-src/ext/soap/php_encoding.c:1.103.2.21.2.23 Sat Feb 24 02:17:26 2007
+++ php-src/ext/soap/php_encoding.c Sun Feb 25 13:19:29 2007
@@ -17,7 +17,7 @@
   |  Dmitry Stogov <[EMAIL PROTECTED]> |
   +--+
 */
-/* $Id: php_encoding.c,v 1.103.2.21.2.23 2007/02/24 02:17:26 helly Exp $ */
+/* $Id: php_encoding.c,v 1.103.2.21.2.24 2007/02/25 13:19:29 dmitry Exp $ */
 
 #include 
 
@@ -2888,8 +2888,18 @@
ret = xmlNewTextLen(BAD_CAST(Z_STRVAL(tmp)), Z_STRLEN(tmp));
zval_dtor(&tmp);
}
+
ret->name = xmlStringTextNoenc;
-   xmlAddChild(parent, ret);
+   ret->parent = parent;
+   ret->doc = parent->doc;
+   ret->prev = parent->last;
+   ret->next = NULL;
+   if (parent->last) {
+   parent->last->next = ret;
+   } else {
+   parent->children = ret;
+   }
+   parent->last = ret;
 
return ret;
 }

http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug40609.phpt?view=markup&rev=1.1
Index: php-src/ext/soap/tests/bugs/bug40609.phpt
+++ php-src/ext/soap/tests/bugs/bug40609.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug40609.wsdl?view=markup&rev=1.1
Index: php-src/ext/soap/tests/bugs/bug40609.wsdl
+++ php-src/ext/soap/tests/bugs/bug40609.wsdl

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/exif exif.c

2007-02-25 Thread Marcus Boerger
helly   Sun Feb 25 13:09:13 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/exif   exif.c 
  Log:
  - MFH Readability
  
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.173.2.5.2.17&r2=1.173.2.5.2.18&diff_format=u
Index: php-src/ext/exif/exif.c
diff -u php-src/ext/exif/exif.c:1.173.2.5.2.17 
php-src/ext/exif/exif.c:1.173.2.5.2.18
--- php-src/ext/exif/exif.c:1.173.2.5.2.17  Sat Feb 24 18:02:11 2007
+++ php-src/ext/exif/exif.c Sun Feb 25 13:09:13 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: exif.c,v 1.173.2.5.2.17 2007/02/24 18:02:11 iliaa Exp $ */
+/* $Id: exif.c,v 1.173.2.5.2.18 2007/02/25 13:09:13 helly Exp $ */
 
 /*  ToDos
  *
@@ -142,7 +142,7 @@
 };
 /* }}} */
 
-#define EXIF_VERSION "1.4 $Id: exif.c,v 1.173.2.5.2.17 2007/02/24 18:02:11 
iliaa Exp $"
+#define EXIF_VERSION "1.4 $Id: exif.c,v 1.173.2.5.2.18 2007/02/25 13:09:13 
helly Exp $"
 
 /* {{{ PHP_MINFO_FUNCTION
  */
@@ -569,7 +569,7 @@
 #define TAG_TABLE_END \
   {TAG_NONE,   "No tag value"},\
   {TAG_COMPUTED_VALUE, "Computed value"},\
-  {TAG_END_OF_LIST,""}  /* Important for exif_get_tagname() IF value != "" 
functionresult is != false */
+  {TAG_END_OF_LIST,""}  /* Important for exif_get_tagname() IF value != "" 
function result is != false */
 
 static tag_info_array tag_table_IFD = {
   { 0x000B, "ACDComment"},
@@ -996,11 +996,8 @@
int i, t;
char tmp[32];
 
-   for (i=0;;i++) {
-   if ((t=tag_table[i].Tag) == tag_num || t==TAG_END_OF_LIST) {
-   if (t==TAG_END_OF_LIST) {
-   break;
-   }
+   for (i = 0; (t = tag_table[i].Tag) != TAG_END_OF_LIST; i++) {
+   if (t == tag_num) {
if (ret && len)  {
strlcpy(ret, tag_table[i].Desc, abs(len));
if (len < 0) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/exif exif.c

2007-02-25 Thread Marcus Boerger
helly   Sun Feb 25 13:09:07 2007 UTC

  Modified files:  
/php-src/ext/exif   exif.c 
  Log:
  - Readability
  
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.193&r2=1.194&diff_format=u
Index: php-src/ext/exif/exif.c
diff -u php-src/ext/exif/exif.c:1.193 php-src/ext/exif/exif.c:1.194
--- php-src/ext/exif/exif.c:1.193   Sat Feb 24 18:37:46 2007
+++ php-src/ext/exif/exif.c Sun Feb 25 13:09:07 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: exif.c,v 1.193 2007/02/24 18:37:46 helly Exp $ */
+/* $Id: exif.c,v 1.194 2007/02/25 13:09:07 helly Exp $ */
 
 /*  ToDos
  *
@@ -142,7 +142,7 @@
 };
 /* }}} */
 
-#define EXIF_VERSION "1.4 $Id: exif.c,v 1.193 2007/02/24 18:37:46 helly Exp $"
+#define EXIF_VERSION "1.4 $Id: exif.c,v 1.194 2007/02/25 13:09:07 helly Exp $"
 
 /* {{{ PHP_MINFO_FUNCTION
  */
@@ -569,7 +569,7 @@
 #define TAG_TABLE_END \
   {TAG_NONE,   "No tag value"},\
   {TAG_COMPUTED_VALUE, "Computed value"},\
-  {TAG_END_OF_LIST,""}  /* Important for exif_get_tagname() IF value != "" 
functionresult is != false */
+  {TAG_END_OF_LIST,""}  /* Important for exif_get_tagname() IF value != "" 
function result is != false */
 
 static tag_info_array tag_table_IFD = {
   { 0x000B, "ACDComment"},
@@ -996,11 +996,8 @@
int i, t;
char tmp[32];
 
-   for (i=0;;i++) {
-   if ((t=tag_table[i].Tag) == tag_num || t==TAG_END_OF_LIST) {
-   if (t==TAG_END_OF_LIST) {
-   break;
-   }
+   for (i = 0; (t = tag_table[i].Tag) != TAG_END_OF_LIST; i++) {
+   if (t == tag_num) {
if (ret && len)  {
strlcpy(ret, tag_table[i].Desc, abs(len));
if (len < 0) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php