diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-11-12 12:34:38 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-11-24 16:40:18 +0100 |
commit | 6272747e0668e98c818c1830ae6d25186e6e649d (patch) | |
tree | 9afa20d2de71d8062c1a1710408a466c67a496a9 /oox | |
parent | 190ccb653955fa1d23e7c0d3bf5e47769a73ba30 (diff) |
cid#1607832 Overflowed constant
Change-Id: Ie0d14ef985bebf4acdb08c460675ebba75f88a8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177166
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/vml/vmlformatting.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index 3eefc8abd090..fa8dd5dc47f7 100644 --- a/oox/source/vml/vmlformatting.cxx +++ b/oox/source/vml/vmlformatting.cxx @@ -957,7 +957,7 @@ void ShadowModel::pushToPropMap(ShapePropertyMap& rPropMap, const GraphicHelper& ? nOffsetY < 0 ? table::ShadowLocation_TOP_LEFT : table::ShadowLocation_BOTTOM_LEFT : nOffsetY < 0 ? table::ShadowLocation_TOP_RIGHT : table::ShadowLocation_BOTTOM_RIGHT; // The width of the shadow is the average of the x and y values, see SwWW8ImplReader::MatchSdrItemsIntoFlySet(). - aFormat.ShadowWidth = ((std::abs(nOffsetX) + std::abs(nOffsetY)) / 2); + aFormat.ShadowWidth = std::min<sal_Int32>(o3tl::saturating_add(std::abs(nOffsetX), std::abs(nOffsetY)) / 2, SHRT_MAX); rPropMap.setProperty(PROP_ShadowFormat, aFormat); } |