activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wujianjin <wujianjin1...@gmail.com>
Subject activemq-cpp-3.7.0 crash
Date Thu, 06 Mar 2014 11:08:16 GMT
hello eveyone look this post.
when i use the activemq-cpp-3.7.0, i got a crash on my program.the crash
point to activemq.dll

////////////////////////////////////////////////////////////////////////////////
void BooleanStream::unmarshal( DataInputStream* dataIn ) {

    try{

        arrayLimit = (short)( dataIn->readByte() & 0xFF );

        if ( arrayLimit == 0xC0 ) {
            arrayLimit = (short)( dataIn->readByte() & 0xFF );
        } else if( arrayLimit == 0x80 ) {
            arrayLimit = dataIn->readShort();
        }

        // Make sure we can accomodate all the data.
        data.resize( arrayLimit );

        // Make sure we get all the data we are expecting
        dataIn->readFully( &data[0], (int)data.size(), 0, arrayLimit );

        clear();
    }
    AMQ_CATCH_RETHROW( IOException )
    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException )
    AMQ_CATCHALL_THROW( IOException )
}
/////////////////////////////////////////////////////////////////////


the line 
        dataIn->readFully( &data[0], (int)data.size(), 0, arrayLimit );

crash when the arraryLimit is 0.

this function throw a c-run-time exception and none of the exception routine
handle this exception.





--
View this message in context: http://activemq.2283324.n4.nabble.com/activemq-cpp-3-7-0-crash-tp4678584.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message