activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r752959 - /activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp
Date Thu, 12 Mar 2009 18:11:10 GMT
Author: tabish
Date: Thu Mar 12 18:11:09 2009
New Revision: 752959

URL: http://svn.apache.org/viewvc?rev=752959&view=rev
Log:
Add an additional check for Null in the marshal and unmarshal methods.

Modified:
    activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp

Modified: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp?rev=752959&r1=752958&r2=752959&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/OpenWireFormat.cpp Thu
Mar 12 18:11:09 2009
@@ -161,6 +161,11 @@
 
     try {
 
+        if( dataOut == NULL ) {
+            throw decaf::io::IOException(
+                __FILE__, __LINE__, "DataOutputStream passed is NULL" );
+        }
+
         int size = 1;
 
         if( command != NULL ) {
@@ -231,6 +236,11 @@
 
     try {
 
+        if( dis == NULL ) {
+            throw decaf::io::IOException(
+                __FILE__, __LINE__, "DataInputStream passed is NULL" );
+        }
+
         if( !sizePrefixDisabled ) {
             dis->readInt();
         }



Mime
View raw message