@@ -780,10 +780,10 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
780780 int i ;
781781
782782 if (atts ) for (i = 0 ; atts [i ]; i ++ ) {
783- if (!strcmp (atts [i ], EL_CHAR_CODE ) && atts [++ i ] && atts [i ][0 ]) {
783+ if (!strcmp (atts [i ], EL_CHAR_CODE ) && atts [i + 1 ] && atts [i + 1 ][0 ]) {
784784 char tmp_buf [2 ];
785785
786- snprintf (tmp_buf , sizeof (tmp_buf ), "%c" , (char )strtol (atts [i ], NULL , 16 ));
786+ snprintf (tmp_buf , sizeof (tmp_buf ), "%c" , (char )strtol (atts [i + 1 ], NULL , 16 ));
787787 php_wddx_process_data (user_data , tmp_buf , strlen (tmp_buf ));
788788 break ;
789789 }
@@ -801,15 +801,15 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
801801 int i ;
802802
803803 if (atts ) for (i = 0 ; atts [i ]; i ++ ) {
804- if (!strcmp (atts [i ], EL_VALUE ) && atts [++ i ] && atts [i ][0 ]) {
804+ if (!strcmp (atts [i ], EL_VALUE ) && atts [i + 1 ] && atts [i + 1 ][0 ]) {
805805 ent .type = ST_BOOLEAN ;
806806 SET_STACK_VARNAME ;
807807
808808 ALLOC_ZVAL (ent .data );
809809 INIT_PZVAL (ent .data );
810810 Z_TYPE_P (ent .data ) = IS_BOOL ;
811811 wddx_stack_push ((wddx_stack * )stack , & ent , sizeof (st_entry ));
812- php_wddx_process_data (user_data , atts [i ], strlen (atts [i ]));
812+ php_wddx_process_data (user_data , atts [i + 1 ], strlen (atts [i + 1 ]));
813813 break ;
814814 }
815815 }
@@ -842,9 +842,9 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
842842 int i ;
843843
844844 if (atts ) for (i = 0 ; atts [i ]; i ++ ) {
845- if (!strcmp (atts [i ], EL_NAME ) && atts [++ i ] && atts [i ][0 ]) {
845+ if (!strcmp (atts [i ], EL_NAME ) && atts [i + 1 ] && atts [i + 1 ][0 ]) {
846846 if (stack -> varname ) efree (stack -> varname );
847- stack -> varname = estrdup (atts [i ]);
847+ stack -> varname = estrdup (atts [i + 1 ]);
848848 break ;
849849 }
850850 }
@@ -857,11 +857,12 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
857857 array_init (ent .data );
858858
859859 if (atts ) for (i = 0 ; atts [i ]; i ++ ) {
860- if (!strcmp (atts [i ], "fieldNames" ) && atts [++ i ] && atts [i ][0 ]) {
860+ if (!strcmp (atts [i ], "fieldNames" ) && atts [i + 1 ] && atts [i + 1 ][0 ]) {
861861 zval * tmp ;
862862 char * key ;
863863 char * p1 , * p2 , * endp ;
864864
865+ i ++ ;
865866 endp = (char * )atts [i ] + strlen (atts [i ]);
866867 p1 = (char * )atts [i ];
867868 while ((p2 = php_memnstr (p1 , "," , sizeof ("," )- 1 , endp )) != NULL ) {
@@ -893,13 +894,13 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
893894 ent .data = NULL ;
894895
895896 if (atts ) for (i = 0 ; atts [i ]; i ++ ) {
896- if (!strcmp (atts [i ], EL_NAME ) && atts [++ i ] && atts [i ][0 ]) {
897+ if (!strcmp (atts [i ], EL_NAME ) && atts [i + 1 ] && atts [i + 1 ][0 ]) {
897898 st_entry * recordset ;
898899 zval * * field ;
899900
900901 if (wddx_stack_top (stack , (void * * )& recordset ) == SUCCESS &&
901902 recordset -> type == ST_RECORDSET &&
902- zend_hash_find (Z_ARRVAL_P (recordset -> data ), (char * )atts [i ], strlen (atts [i ])+ 1 , (void * * )& field ) == SUCCESS ) {
903+ zend_hash_find (Z_ARRVAL_P (recordset -> data ), (char * )atts [i + 1 ], strlen (atts [i + 1 ])+ 1 , (void * * )& field ) == SUCCESS ) {
903904 ent .data = * field ;
904905 }
905906
0 commit comments