Author: shuston Date: Thu Oct 18 20:39:51 2012 New Revision: 1399838 URL: http://svn.apache.org/viewvc?rev=1399838&view=rev Log: Fix recovering a zero-length message. Fixes QPID-3491.
Modified: qpid/trunk/qpid/cpp/src/qpid/store/ms-sql/MessageRecordset.cpp Modified: qpid/trunk/qpid/cpp/src/qpid/store/ms-sql/MessageRecordset.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/store/ms-sql/MessageRecordset.cpp?rev=1399838&r1=1399837&r2=1399838&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/qpid/store/ms-sql/MessageRecordset.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/store/ms-sql/MessageRecordset.cpp Thu Oct 18 20:39:51 2012 @@ -147,7 +147,7 @@ MessageRecordset::recover(qpid::broker:: // Now, do we need the rest of the content? long contentLength = blobSize - headerFieldLength - headerSize; - if (msg->loadContent(contentLength)) { + if (contentLength > 0 && msg->loadContent(contentLength)) { BlobAdapter content(contentLength); content = rs->Fields->Item["fieldTableBlob"]->GetChunk(contentLength); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org