ofz#518230883 Integer-overflow

page margins shouldn't negative, so clamp them to >= 0 on import.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Idbc180c1e7d710f9b655a188d41a1c573c28fb14
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3568
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit e79cf4ad2adc9ed5bafdec2c23630471cb789e19)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205869
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
Caolán McNamara
2026-06-01 16:00:54 +02:00
committed by Xisco Fauli
parent ecaf7f7e00
commit dbe1604818
+4 -4
View File
@@ -309,28 +309,28 @@ SdXMLPageMasterStyleContext::SdXMLPageMasterStyleContext(
case XML_ELEMENT(FO_COMPAT, XML_MARGIN_TOP):
{
GetSdImport().GetMM100UnitConverter().convertMeasureToCore(
mnBorderTop, aIter.toView());
mnBorderTop, aIter.toView(), 0);
break;
}
case XML_ELEMENT(FO, XML_MARGIN_BOTTOM):
case XML_ELEMENT(FO_COMPAT, XML_MARGIN_BOTTOM):
{
GetSdImport().GetMM100UnitConverter().convertMeasureToCore(
mnBorderBottom, aIter.toView());
mnBorderBottom, aIter.toView(), 0);
break;
}
case XML_ELEMENT(FO, XML_MARGIN_LEFT):
case XML_ELEMENT(FO_COMPAT, XML_MARGIN_LEFT):
{
GetSdImport().GetMM100UnitConverter().convertMeasureToCore(
mnBorderLeft, aIter.toView());
mnBorderLeft, aIter.toView(), 0);
break;
}
case XML_ELEMENT(FO, XML_MARGIN_RIGHT):
case XML_ELEMENT(FO_COMPAT, XML_MARGIN_RIGHT):
{
GetSdImport().GetMM100UnitConverter().convertMeasureToCore(
mnBorderRight, aIter.toView());
mnBorderRight, aIter.toView(), 0);
break;
}
case XML_ELEMENT(FO, XML_PAGE_WIDTH):