summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-07-27 19:54:06 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-07-27 21:58:34 +0200
commit1940ffc5347768fdc4d2bba636b40d451a274f1e (patch)
tree7af80dfff241f9bf5123fc3b813272793a8f263a
parentbc06fee6924419a8324145b09df54c15a07e1a76 (diff)
ofz#36348 Integer-overflow
Change-Id: I7c6020e94c9ec9d002e66d0ad83426c062ebd5c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119574 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--filter/source/graphicfilter/icgm/class4.cxx3
-rw-r--r--sd/qa/unit/data/cgm/pass/ofz36348-ubsan-1.cgmbin0 -> 12507 bytes
2 files changed, 3 insertions, 0 deletions
diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx
index 697a466793bc..8f972ed4f1ee 100644
--- a/filter/source/graphicfilter/icgm/class4.cxx
+++ b/filter/source/graphicfilter/icgm/class4.cxx
@@ -398,6 +398,9 @@ void CGM::ImplDoClass4()
}
if (!bUseless)
+ bUseless = useless(aStartingPoint.X) || useless(aStartingPoint.Y);
+
+ if (!bUseless)
{
double fStartAngle = ImplGetOrientation( aCenterPoint, aStartingPoint );
double fInterAngle = ImplGetOrientation( aCenterPoint, aIntermediatePoint );
diff --git a/sd/qa/unit/data/cgm/pass/ofz36348-ubsan-1.cgm b/sd/qa/unit/data/cgm/pass/ofz36348-ubsan-1.cgm
new file mode 100644
index 000000000000..4b2e9cf0d8b6
--- /dev/null
+++ b/sd/qa/unit/data/cgm/pass/ofz36348-ubsan-1.cgm
Binary files differ