diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx index 11efac125d22..f993d69b77ae 100644 --- a/svx/source/dialog/rulritem.cxx +++ b/svx/source/dialog/rulritem.cxx @@ -670,8 +670,9 @@ SvxColumnDescription::SvxColumnDescription(long start, long end, long endMin, lo nStart (start), nEnd (end), bVisible (bVis), - nEndMin (endMin), - nEndMax (endMax) + // fdo#85858 hack: clamp these to smaller value to prevent overflow + nEndMin(std::min(endMin, std::numeric_limits::max())), + nEndMax(std::min(endMax, std::numeric_limits::max())) {} bool SvxColumnDescription::operator==(const SvxColumnDescription& rCmp) const