diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-06-01 10:34:07 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-06-01 16:02:19 +0200 |
commit | 7d8d65d850cdd0bdaa84e9cff9f8c1654c61ddb4 (patch) | |
tree | 06c645dbdac94531341f0486f9351aaf4b75073b /binaryurp | |
parent | 9b453e699ff53253ddc2562435dc2b91d883b1df (diff) |
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.cxx | 2 |
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"); } |