axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <>
Subject Re: |AXIS2] [AXIS2C] c-stubs: memset in axis2_<TYPE>_create missing
Date Fri, 22 Jun 2007 02:10:52 GMT
Dr. Florian Steinborn wrote:
> For more safety it would be desirable if the generation would add the 
> memset() call. 
+1 for calling memset(). Please raise a Jira on this.
> I did not initialize every field of the structure before returning it 
> and the service crashed (with the server), when it tried to return the 
> values. In that the generated function axis2_Date_serialize() is 
> called. This function has a problem, as it tries to print (with 
> sprintf()) all the numeric members of the Dat-struct into 64-bytes 
> memory blocks. Printing a double with sprintf() this way into a 
> 64-byte array will most likely crash, especially with uninitialized 
> memory, as the resulting string will be longer than 64 bytes.
To figure out the exact problem, I would like to codegen and see. Would 
it be possible to send the WSDL file you are using? (if it is OK to make 
it public only)
> Unfortunately the user cannot call the memset himself after calling 
> the constructor as the real length of the type is hidden in the 
> module. I myself now know that I have to call the setter method for 
> each member of a new struct.
Calling setter for all members not an elegant solution. We got to do the 
memset fix in the codegen code.

> Thanks,
> Flori.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Samisa Abeysinghe : (WSO2 Oxygen Tank - Web Services Developers' Portal)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message