Author: tabish
Date: Fri Nov 20 20:36:48 2009
New Revision: 882705
URL: http://svn.apache.org/viewvc?rev=882705&view=rev
Log:
Fix problem found on Windows where a read of a zero sized vector can cause a
debug assertion to fire.
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp?rev=882705&r1=882704&r2=882705&view=diff
==============================================================================
---
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp
(original)
+++
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp
Fri Nov 20 20:36:48 2009
@@ -268,6 +268,10 @@
cms::MessageNotReadableException,
cms::CMSException ) {
+ if( value.size() == 0 ) {
+ return 0;
+ }
+
return this->readBytes( &value[0], value.size() );
}