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 Kamlesh kumar <ka...@yahoo.com> on 2006/08/17 22:38:53 UTC
SOAPTransport segfaults
SOAPTransport.h defines two member variables
m_pcUsername and m_pcPassword.
However, they are not set to NULL in the constructor
and so causes the following piece of code to segfault
since m_pcUsername and m_pcPassword could be pointing
to random memory address.
virtual ~SOAPTransport()
{
if (m_pcUsername)
{
delete[]m_pcUsername;
m_pcUsername = NULL;
}
if (m_pcPassword)
{
delete[]m_pcPassword;
m_pcPassword = NULL;
}
};
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org
Re: SOAPTransport segfaults
Posted by Franz Fehringer <fe...@isogmbh.de>.
As a side note the ifs are useless anyway since delete 0 is perfectly legal.
Franz
Kamlesh kumar schrieb:
> SOAPTransport.h defines two member variables
> m_pcUsername and m_pcPassword.
>
> However, they are not set to NULL in the constructor
> and so causes the following piece of code to segfault
> since m_pcUsername and m_pcPassword could be pointing
> to random memory address.
>
> virtual ~SOAPTransport()
> {
> if (m_pcUsername)
> {
> delete[]m_pcUsername;
> m_pcUsername = NULL;
> }
> if (m_pcPassword)
> {
> delete[]m_pcPassword;
> m_pcPassword = NULL;
> }
> };
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>
Re: SOAPTransport segfaults
Posted by Kamlesh kumar <ka...@yahoo.com>.
I have created a JIRA issue for this.
https://issues.apache.org/jira/browse/AXISCPP-999
Can someone take a look at it? The fix is pretty
simple.
-k
--- Kamlesh kumar <ka...@yahoo.com> wrote:
> SOAPTransport.h defines two member variables
> m_pcUsername and m_pcPassword.
>
> However, they are not set to NULL in the constructor
> and so causes the following piece of code to
> segfault
> since m_pcUsername and m_pcPassword could be
> pointing
> to random memory address.
>
> virtual ~SOAPTransport()
> {
> if (m_pcUsername)
> {
> delete[]m_pcUsername;
> m_pcUsername = NULL;
> }
> if (m_pcPassword)
> {
> delete[]m_pcPassword;
> m_pcPassword = NULL;
> }
> };
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> axis-c-dev-help@ws.apache.org
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org