diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-06-09 10:42:00 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-06-09 10:42:27 +0200 |
commit | bafdfa1f5a9af57f262919a48036006d5f53bf83 (patch) | |
tree | db928c0557b550efd192a2ebc695d9cfde71932b | |
parent | ba3df202068eaff9d29dfde029b45ba7f3fd1be5 (diff) |
Avoid overflow in subtraction
Change-Id: Ib92239fd9b347efbeeeef9661a1a9180445e7739
-rw-r--r-- | svl/source/items/itemset.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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 |