axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Resolved: (AXISCPP-37) Apache Module: mod_axis2 causes crash
Date Wed, 07 Apr 2004 13:39:43 GMT
Message:

   The following issue has been resolved as FIXED.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXISCPP-37

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXISCPP-37
    Summary: Apache Module: mod_axis2 causes crash
       Type: Bug

     Status: Resolved
 Resolution: FIXED

    Project: Axis-C++
 Components: 
             Transport (Server)
   Fix Fors:
             current (nightly)
   Versions:
             1.0 Final

   Assignee: 
   Reporter: Roland Kosovsky

    Created: Thu, 15 Jan 2004 4:08 PM
    Updated: Wed, 7 Apr 2004 6:38 AM
Environment: Operating System: Other
Platform: Other

Description:
"sstr->so.http.op_headercount" is not set to 0 in file "mod_axis2.c". During my
tests this caused a crash (in "mod_axis.c" it is zeroed).

mod_axis2.c, Ln 138:
static int mod_axis_method_handler (request_rec *req_rec)
...
    sstr = malloc(sizeof(Ax_soapstream));
    memset(sstr, 0, sizeof(Ax_soapstream)); // <<<<< insert this line


However a found an other bug:
 ...
 if(0 != process_request(sstr))
     {
         /*ap_rputs("SOAP Engine failed to response",req_rec);*/
         return OK;  // ###### sstr will never be freed!!!!!
     }
     if (sstr->so.http.op_headers)
         free(sstr->so.http.op_headers);
     free(sstr);
...


My suggestion is to create to object on stack so it will be deleted for free:
  Ax_soapstream obj;
  memset(&obj, 0, sizeof(obj));
  Ax_soapstream* sstr = &obj;  
  ...


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message