summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2006-05-25 10:01:30 +0000
committerMarcus Boerger <helly@php.net>2006-05-25 10:01:30 +0000
commita91df0f95fe6417b0f41b34b24818417f91e5a0c (patch)
tree8ca54443c22b0d7989de8151313b5a5c964408d8
parent1b237976ad2a69b6d91429ffd9fee54f7d0b9bca (diff)
downloadphp-git-a91df0f95fe6417b0f41b34b24818417f91e5a0c.tar.gz
- MFH Fixed bug #37587 (var without attribute causes segfault
-rw-r--r--NEWS3
-rw-r--r--ext/wddx/wddx.c10
2 files changed, 7 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index 2017d342b6..ee91aa5c6f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-?? ??? 2006, PHP 5.?.?
+?? ??? 2006, PHP 5.1.5
+- Fixed bug #37587 (var without attribute causes segfault). (Marcus)
- Fixed bug #37576 (FastCGI env (cgi vars) table overflow). (Piotr)
- Fixed bug #37496 (FastCGI output buffer overrun). (Piotr, Dmitry)
- Fixed bug #37487 (oci_fetch_array() array-type should always default to
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index b2833b2f11..e83ba8ccda 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -751,7 +751,7 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
} else if (!strcmp(name, EL_CHAR)) {
int i;
- for (i = 0; atts[i]; i++) {
+ if (atts) for (i = 0; atts[i]; i++) {
if (!strcmp(atts[i], EL_CHAR_CODE) && atts[++i] && atts[i][0]) {
char tmp_buf[2];
@@ -771,7 +771,7 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
} else if (!strcmp(name, EL_BOOLEAN)) {
int i;
- for (i = 0; atts[i]; i++) {
+ if (atts) for (i = 0; atts[i]; i++) {
if (!strcmp(atts[i], EL_VALUE) && atts[++i] && atts[i][0]) {
ent.type = ST_BOOLEAN;
SET_STACK_VARNAME;
@@ -812,7 +812,7 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
} else if (!strcmp(name, EL_VAR)) {
int i;
- for (i = 0; atts[i]; i++) {
+ if (atts) for (i = 0; atts[i]; i++) {
if (!strcmp(atts[i], EL_NAME) && atts[++i] && atts[i][0]) {
char *decoded;
int decoded_len;
@@ -829,7 +829,7 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
MAKE_STD_ZVAL(ent.data);
array_init(ent.data);
- for (i = 0; atts[i]; i++) {
+ if (atts) for (i = 0; atts[i]; i++) {
if (!strcmp(atts[i], "fieldNames") && atts[++i] && atts[i][0]) {
zval *tmp;
char *key;
@@ -869,7 +869,7 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
ent.varname = NULL;
ent.data = NULL;
- for (i = 0; atts[i]; i++) {
+ if (atts) for (i = 0; atts[i]; i++) {
if (!strcmp(atts[i], EL_NAME) && atts[++i] && atts[i][0]) {
char *decoded;
int decoded_len;