axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hawkins <HAWKI...@uk.ibm.com>
Subject Re: m_iLibCount in ChannelFactory class
Date Tue, 25 Jan 2005 09:12:03 GMT
Sorry, not that familiar with this class. What is m_iLibCount ?


John Hawkins





Samisa Abeysinghe <samisa.abeysinghe@gmail.com> 
25/01/2005 08:11
Please respond to
"Apache AXIS C Developers List"


To
Apache AXIS C Developers List <axis-c-dev@ws.apache.org>
cc

Subject
m_iLibCount in ChannelFactory class






Hi,
    m_iLibCount in ChannelFactory class hit the celing value
ChannelFactory_MaxListSize (which is 2 at the moment) during the first
call to ChannelFactory::LoadChannelLibrary().
   Then m_iLibCount stays at 2 and the subsequest calls to
ChannelFactory::LoadChannelLibrary() tries to access invalid memory on
line:
m_pChannel[m_iLibCount] = pChannel; (in other words tries to access
m_pChannel[2] which is out of array given that array size is 2.

   I ran into this while running the memory profiler. 
   I think this is a bug. 

I guess we have to correct it by adding an else clause to:
if( m_iLibCount < ChannelFactory_MaxListSize)
                {
                        m_iLibCount++;
                }
else
{
     m_iLibCount = 0; // hit the celing, next load attempt need to
reload form start
}

    Any comments please.

Thanks,
Samisa...


Mime
View raw message