axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lahiru Gunathilake (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2C-867) Function axis2_svc_client_remove_all_headers
Date Fri, 04 Jan 2008 03:32:34 GMT
Function axis2_svc_client_remove_all_headers
--------------------------------------------

                 Key: AXIS2C-867
                 URL: https://issues.apache.org/jira/browse/AXIS2C-867
             Project: Axis2-C
          Issue Type: Bug
          Components: core/clientapi
    Affects Versions: Current (Nightly)
         Environment: Ubuntu 7.04
            Reporter: Lahiru Gunathilake
             Fix For: Current (Nightly)


 for (i = 0; i < size; i++)
    {
        /*axiom_node_t *node = NULL;                                                     
                                                                   
           node = axutil_array_list_get(svc_client->headers, env, i);                 
                                                                      
                                                                                         
                                                                   
           if (node)                                                                     
                                                                   
           {                                                                             
                                                                   
           axiom_node_free_tree(node, env);                                              
                                                                   
           node = NULL;                                                                  
                                                                   
           } */
        axutil_array_list_remove(svc_client->headers, env, i);
    }
AXIS2_EXTERN void *AXIS2_CALL
 axutil_array_list_remove(
     struct axutil_array_list *array_list,
     const axutil_env_t * env,
     int index)
 {
     void *result = NULL;
     int i = 0;
     AXIS2_PARAM_CHECK (env->error, array_list, AXIS2_FAILURE);

     if (axutil_array_list_check_bound_exclusive(array_list, env, index))
     {
         result = array_list->data[index];
         for (i = index; i < array_list->size - 1; i++)
             array_list->data[i] = array_list->data[i + 1];
        array_list->size--;
     }

     return result;
 } There is a possible bug in "axis2_svc_client_remove_all_headers" function.  The call to
"axutil_array_list_remove" is where the problem stems from.  Since the for-loop  is incrementing,
and the value of "array_list->size"  is decrementing, eventually line 120 will fail, and
some of the headers will not be cleared out.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Mime
View raw message