[Libreoffice-commits] core.git: svl/source
Stephan Bergmann
sbergman at redhat.com
Fri Jun 9 08:42:47 UTC 2017
svl/source/items/itemset.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit bafdfa1f5a9af57f262919a48036006d5f53bf83
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 9 10:42:00 2017 +0200
Avoid overflow in subtraction
Change-Id: Ib92239fd9b347efbeeeef9661a1a9180445e7739
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 0b46705239f0..664e36acfcfe 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -675,7 +675,8 @@ void SfxItemSet::MergeRange( sal_uInt16 nFrom, sal_uInt16 nTo )
{
assert(pRange[0] <= pRange[1]);
// ranges must be sorted and discrete
- assert(!pRange[2] || (pRange[2] - pRange[1]) > 1);
+ assert(
+ !pRange[2] || (pRange[2] > pRange[1] && pRange[2] - pRange[1] > 1));
}
#endif
More information about the Libreoffice-commits
mailing list