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>
This commit is contained in:
parent
9b453e699f
commit
7d8d65d850
1 changed files with 1 additions and 1 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue