summaryrefslogtreecommitdiff
path: root/filter/source/graphicfilter
diff options
context:
space:
mode:
authorYusuf Keten <ketenyusuf@gmail.com>2020-01-07 00:05:15 +0300
committerMichael Stahl <michael.stahl@cib.de>2020-01-08 16:24:12 +0100
commitd66ddcffe61d90cb1472e74a040963086032bf9c (patch)
tree2ec835db3c2d6119dc415d0ec4e4e9b6a09e8c5d /filter/source/graphicfilter
parent4506e77ff9791ef9ca42d5395300acd50f429528 (diff)
tdf#75280 Convert inappropriate use of sal_uIntPtr to better integer types
Change-Id: Idf73b768671c0daa0d815b75ce71740fc0e5f5c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86310 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'filter/source/graphicfilter')
-rw-r--r--filter/source/graphicfilter/icgm/class1.cxx2
-rw-r--r--filter/source/graphicfilter/icgm/class4.cxx6
2 files changed, 4 insertions, 4 deletions
diff --git a/filter/source/graphicfilter/icgm/class1.cxx b/filter/source/graphicfilter/icgm/class1.cxx
index cf9e7ed9885f..2661931d7df2 100644
--- a/filter/source/graphicfilter/icgm/class1.cxx
+++ b/filter/source/graphicfilter/icgm/class1.cxx
@@ -169,7 +169,7 @@ void CGM::ImplDoClass1()
{
sal_uInt32 nSize = ImplGetUI(1);
- if (static_cast<sal_uIntPtr>(mpEndValidSource - (mpSource + mnParaSize)) < nSize)
+ if (static_cast<sal_uInt32>(mpEndValidSource - (mpSource + mnParaSize)) < nSize)
throw css::uno::Exception("attempt to read past end of input", nullptr);
pElement->aFontList.InsertName( mpSource + mnParaSize, nSize );
diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx
index 0213e89542e3..4760215ebe18 100644
--- a/filter/source/graphicfilter/icgm/class4.cxx
+++ b/filter/source/graphicfilter/icgm/class4.cxx
@@ -186,7 +186,7 @@ void CGM::ImplDoClass4()
sal_uInt32 nType = ImplGetUI16();
sal_uInt32 nSize = ImplGetUI( 1 );
- if (static_cast<sal_uIntPtr>(mpEndValidSource - (mpSource + mnParaSize)) < nSize)
+ if (static_cast<sal_uInt32>(mpEndValidSource - (mpSource + mnParaSize)) < nSize)
throw css::uno::Exception("attempt to read past end of input", nullptr);
OUString aStr(reinterpret_cast<char*>(mpSource) + mnParaSize, nSize, RTL_TEXTENCODING_ASCII_US);
@@ -223,7 +223,7 @@ void CGM::ImplDoClass4()
sal_uInt32 nType = ImplGetUI16();
sal_uInt32 nSize = ImplGetUI(1);
- if (static_cast<sal_uIntPtr>(mpEndValidSource - (mpSource + mnParaSize)) < nSize)
+ if (static_cast<sal_uInt32>(mpEndValidSource - (mpSource + mnParaSize)) < nSize)
throw css::uno::Exception("attempt to read past end of input", nullptr);
OUString aStr(reinterpret_cast<char*>(mpSource) + mnParaSize, nSize, RTL_TEXTENCODING_ASCII_US);
@@ -240,7 +240,7 @@ void CGM::ImplDoClass4()
(void)ImplGetUI16(); // nType
sal_uInt32 nSize = ImplGetUI( 1 );
- if (static_cast<sal_uIntPtr>(mpEndValidSource - (mpSource + mnParaSize)) <= nSize)
+ if (static_cast<sal_uInt32>(mpEndValidSource - (mpSource + mnParaSize)) <= nSize)
throw css::uno::Exception("attempt to read past end of input", nullptr);
mpSource[ mnParaSize + nSize ] = 0;