From 74146e0102d367c5e7a3567ad6bf8a46548d55de Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Thu, 24 Sep 2020 17:33:06 +0200 Subject: [PATCH] Avoid heap-buffer-overflow [ChangeLog][QOutlineMapper] Avoid heap-buffer-overflow Fixes: oss-fuzz-24615 Pick-to: 5.12 5.15 Change-Id: Ia67e1fb830850d04f068d8b5c009687f3deff156 Reviewed-by: Allan Sandfeld Jensen --- src/gui/painting/qoutlinemapper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp index 67e450986d..f7bc2d743f 100644 --- a/src/gui/painting/qoutlinemapper.cpp +++ b/src/gui/painting/qoutlinemapper.cpp @@ -78,6 +78,8 @@ void QOutlineMapper::curveTo(const QPointF &cp1, const QPointF &cp2, const QPoin printf("QOutlineMapper::curveTo() (%f, %f)\n", ep.x(), ep.y()); #endif + if (!m_elements.size()) + return; QBezier bezier = QBezier::fromPoints(m_elements.last(), cp1, cp2, ep); bool outsideClip = false;