You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "nadir amra (JIRA)" <ax...@ws.apache.org> on 2006/08/02 02:00:14 UTC
[jira] Closed: (AXISCPP-921) WhatAmI returns reference to local
store
[ http://issues.apache.org/jira/browse/AXISCPP-921?page=all ]
nadir amra closed AXISCPP-921.
------------------------------
Resolution: Fixed
Continuing on with simplicity/clarity theme, at this point of I do not see usefulness of these routines, so instead of fixing them I removed them. When I get to improving tracing, then that would be proper place for such information.
> WhatAmI returns reference to local store
> ----------------------------------------
>
> Key: AXISCPP-921
> URL: http://issues.apache.org/jira/browse/AXISCPP-921
> Project: Axis-C++
> Issue Type: Bug
> Components: Transport (axis3)
> Affects Versions: 1.6 Final
> Environment: All platforms, Issue found in nightly drop 24-Jan-2006 21:23
> Reporter: Emanuel Norrbin
>
> File: transport\axis3\HTTPTransportInstantiator.cpp
> Method: const char * WhatAmI()
> Line: 79 - 94
> The method below returns a reference to the locally allocated string szWhatAmI[256],
> if a char* is to be returned it has to be allocated globally or the program might crash
> when this memory is acessed by the caller.
> STORAGE_CLASS_INFO const char * WhatAmI()
> {
> char szInfo[64];
> char szWhatAmI[256];
> const char * pszWhatAmI = szWhatAmI; //** Local store
> memset( szInfo, 0, sizeof( szInfo));
> memset( szWhatAmI, 0, sizeof( szWhatAmI));
> strcpy( szWhatAmI, "LibraryName: HTTPTransport\n");
> #ifdef WIN32
> sprintf( szInfo, "Built: %s\n", __TIMESTAMP__);
> strcat( szWhatAmI, szInfo);
> #endif
> return pszWhatAmI; //** Returns reference to local store!!
> }
--
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org