vijayyande / spserver

Automatically exported from code.google.com/p/spserver
Other
0 stars 0 forks source link

response消息回复时报错 #36

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

                memcpy(buff+len,fcr,sizeof(FileConnect_rsp));
        SP_Message * msg = new SP_Message();
        msg->getMsg()->append(buff,buffsize);
        /*SP_Buffer* spbuf=new SP_Buffer();
        spbuf->reset();
        spbuf->append(buff,buffsize);*/
        //response->getFromSid()->
        //response->getReply()->getMsg()->append(_message);
        response->addMessage(msg);

What is the expected output? What do you see instead?
在addMessage()或getMsg()->append()时出现
in yd_server.exe: 0xC0000005: Access violation reading location 0x00000208.
跟踪时,sputils中的append中mCount和nMaxCount均未分配
if( mCount >= mMaxCount ) {
        mMaxCount = ( mMaxCount * 3 ) / 2 + 1;
        mFirst = (void**)realloc( mFirst, sizeof( void * ) * mMaxCount );
        assert( NULL != mFirst );
        memset( mFirst + mCount, 0, ( mMaxCount - mCount ) * sizeof( void * ) );
    }
What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by lihao...@gmail.com on 19 Aug 2010 at 9:19

GoogleCodeExporter commented 9 years ago
版本是0.9.5

Original comment by lihao...@gmail.com on 19 Aug 2010 at 9:27