diff options
Diffstat (limited to 'binaryurp/source/reader.cxx')
-rw-r--r-- | binaryurp/source/reader.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx index 91f2e51a0f25..393d8312e43a 100644 --- a/binaryurp/source/reader.cxx +++ b/binaryurp/source/reader.cxx @@ -35,6 +35,7 @@ #include <com/sun/star/uno/XCurrentContext.hpp> #include <com/sun/star/uno/XInterface.hpp> #include <cppu/unotype.hxx> +#include <o3tl/safeint.hxx> #include <rtl/byteseq.h> #include <rtl/ustring.hxx> #include <sal/log.hxx> @@ -70,11 +71,11 @@ css::uno::Sequence< sal_Int8 > read( if (n == 0 && eofOk) { return css::uno::Sequence< sal_Int8 >(); } - if (n != static_cast< sal_Int32 >(size)) { + if (o3tl::make_unsigned(n) != size) { throw css::io::IOException( "binaryurp::Reader: premature end of input"); } - assert(buf.getLength() == static_cast< sal_Int32 >(size)); + assert(o3tl::make_unsigned(buf.getLength()) == size); return buf; } @@ -337,6 +338,7 @@ void Reader::readMessage(Unmarshal & unmarshal) { uno_threadpool_putJob( bridge_->getThreadPool(), tid.getHandle(), req.get(), &request, !synchronous); + // coverity[leaked_storage] - "request" destroys req when executed req.release(); } } @@ -445,6 +447,7 @@ void Reader::readReplyMessage(Unmarshal & unmarshal, sal_uInt8 flags1) { uno_threadpool_putJob( bridge_->getThreadPool(), tid.getHandle(), resp.get(), nullptr, false); + // coverity[leaked_storage] - "Bridge::makeCall" destroys resp when received resp.release(); break; } |