[ http://issues.apache.org/jira/browse/AXISCPP-560?page=history ]
     
Fred Preston closed AXISCPP-560:
--------------------------------

    Resolution: Fixed

Hi Tim,
The code you suggested has now substituted the original 'stack assumption' code 
with one minor change.  This was put in conjunction with another fix and is now 
in the WSDL2Ws (ClientStubWriter.java).

Regards,

Fred Preston.

> SetSecure must be changed to use <stdarg.h>
> -------------------------------------------
>
>          Key: AXISCPP-560
>          URL: http://issues.apache.org/jira/browse/AXISCPP-560
>      Project: Axis-C++
>         Type: Bug
>   Components: Client - Stub
>     Versions: current (nightly)
>     Reporter: Tim Bartley
>     Assignee: Fred Preston

>
> Currently the generated client stub code for SetSecure is:
> void Service::SetSecure( char * pszArguments, ...)
> {
>       char ** ppszArgPtr = &pszArguments;
>       int             iArgIndex = 0;
>       while( *ppszArgPtr != NULL)
>       {
>               sArguments[iArgIndex] = *ppszArgPtr;
>               iArgIndex++;
>               ppszArgPtr++;
>       }
> }
> This makes horrible assumptions about how arguments are passed to functions 
> and which direction the stack grows and is highly non-portable.
> The correct code would be:
> #include <stdarg.h>
> void Service::SetSecure( char * pszArguments, ...)
> {
>         int           iArgIndex = 0;
>         va_list args;
>         va_start(args, pszArguments);
>       
>         while (pszArguments) {
>                 sArguments[iArgIndex++] = pszArguments;
>                 pszArguments = va_arg(args, char*);
>         }
>         va_end(args);
> }

-- 
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

Reply via email to