summaryrefslogtreecommitdiffstats
path: root/binaryurp
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-06-01 10:34:07 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-06-01 16:02:19 +0200
commit7d8d65d850cdd0bdaa84e9cff9f8c1654c61ddb4 (patch)
tree06c645dbdac94531341f0486f9351aaf4b75073b /binaryurp
parentnss: upgrade to release 3.79 (diff)
downloadcore-7d8d65d850cdd0bdaa84e9cff9f8c1654c61ddb4.tar.gz
core-7d8d65d850cdd0bdaa84e9cff9f8c1654c61ddb4.zip
The return value of XConnection::read is guaranteed to be non-negative
...so use o3tl::make_unsigned when comparing it against an expression of unsigned integer type, instead of casting that expression to a signed type Change-Id: Id2bea3010bf67bdaeb0766b20baecba195bf0181 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135227 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'binaryurp')
-rw-r--r--binaryurp/source/reader.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index 7cabbd41c8a1..cbd18f1d8252 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -71,7 +71,7 @@ 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");
}