[Libreoffice-commits] core.git: vcl/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jan 23 11:24:38 UTC 2020
vcl/source/filter/png/pngread.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 0858bae3c12dc81b87a78bb0522b0dff12bbf188
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Jan 23 11:01:49 2020 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Jan 23 12:24:01 2020 +0100
Avoid explicit cast to smaller sal_uInt32 from larger long
...in what might be an attempt to avoid warnings about signed vs. unsigned
comparisons
Change-Id: I17fca3d13628dedbb7044ffd8a585688fd81b045
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87250
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/vcl/source/filter/png/pngread.cxx b/vcl/source/filter/png/pngread.cxx
index 1e89657cb807..d6908a9bcccf 100644
--- a/vcl/source/filter/png/pngread.cxx
+++ b/vcl/source/filter/png/pngread.cxx
@@ -19,6 +19,7 @@
#include <sal/config.h>
#include <sal/log.hxx>
+#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
#include <cassert>
@@ -936,7 +937,7 @@ void PNGReaderImpl::ImplReadIDAT()
mnYpos += mnYAdd;
}
- if ( mnYpos >= static_cast<sal_uInt32>(maOrigSize.Height()) )
+ if ( mnYpos >= o3tl::make_unsigned(maOrigSize.Height()) )
{
if( (mnPass < 7) && mnInterlaceType )
if( ImplPreparePass() )
More information about the Libreoffice-commits
mailing list