diff options
author | Robert Loehning <robert.loehning@qt.io> | 2020-09-24 17:33:06 +0200 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2020-09-25 18:00:49 +0000 |
commit | 74146e0102d367c5e7a3567ad6bf8a46548d55de (patch) | |
tree | c38631fa8215c13c48538469fd336e64b8c46fee /src/gui/painting | |
parent | a51b7844ca988dcc4d18d18dd0785acf15319413 (diff) |
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 <allan.jensen@qt.io>
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qoutlinemapper.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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; |