On 03/06/2014 06:08 AM, wujianjin wrote:
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.

Latest release is v3.8.2, you should upgrade to this version.

--
Tim Bish
Sr Software Engineer | RedHat Inc.
[email protected] | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/

Reply via email to