[Libreoffice-commits] core.git: include/xmloff xmloff/source
Caolán McNamara
caolanm at redhat.com
Fri Feb 9 21:03:29 UTC 2018
include/xmloff/unointerfacetouniqueidentifiermapper.hxx | 2 +-
xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 05e3feb495ff3078c80b1af6aad7c33ac5340b01
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Feb 9 11:30:10 2018 +0000
ofz#6180 Integer-overflow
Change-Id: I6339a6ebb188dc9e7bccfa629a40af8e67c13feb
Reviewed-on: https://gerrit.libreoffice.org/49487
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/xmloff/unointerfacetouniqueidentifiermapper.hxx b/include/xmloff/unointerfacetouniqueidentifiermapper.hxx
index 50b70eee5346..8a715a398dd8 100644
--- a/include/xmloff/unointerfacetouniqueidentifiermapper.hxx
+++ b/include/xmloff/unointerfacetouniqueidentifiermapper.hxx
@@ -75,7 +75,7 @@ private:
void insertReference( const OUString& rIdentifier, const css::uno::Reference< css::uno::XInterface >& rInterface );
IdMap_t maEntries;
- sal_Int32 mnNextId;
+ sal_uInt32 mnNextId;
};
}
diff --git a/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx b/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx
index 795aa5838218..5e144d7f7053 100644
--- a/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx
+++ b/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx
@@ -166,7 +166,7 @@ void UnoInterfaceToUniqueIdentifierMapper::insertReference( const OUString& rIde
// so we make sure we will never generate
// an integer value like this one
sal_Int32 nId = rIdentifier.copy(2).toInt32();
- if( mnNextId <= nId )
+ if (nId > 0 && mnNextId <= static_cast<sal_uInt32>(nId))
mnNextId = nId + 1;
}
More information about the Libreoffice-commits
mailing list