Avoid heap-buffer-overflow

[ChangeLog][QOutlineMapper] Avoid heap-buffer-overflow

Fixes: oss-fuzz-24615
Change-Id: Ia67e1fb830850d04f068d8b5c009687f3deff156
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 74146e0102d367c5e7a3567ad6bf8a46548d55de)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Robert Loehning 2020-09-24 17:33:06 +02:00 committed by Qt Cherry-pick Bot
parent 504cdf2f47
commit 5c370569e5

View File

@ -77,6 +77,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;