diff options
author | Robert Loehning <robert.loehning@qt.io> | 2020-07-08 20:42:57 +0200 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2020-07-23 10:07:30 +0200 |
commit | fd0c9fcaccbbb284f00c3403152bd3faf5940888 (patch) | |
tree | ddeec50ec20a2b88a1ee87fde2d9f014ca804d69 /src/gui/painting/qcosmeticstroker.cpp | |
parent | cd1685882331e5a50cb815023ac36ffe6c2ce67c (diff) |
Multiply instead of shifting
The shift operator is undefined for negative values.
Fixes: oss-fuzz-23735
Pick-to: 5.15 5.12
Change-Id: Ib4bad0bf2135f9ddc95f6d7de64d935a02b4791e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/gui/painting/qcosmeticstroker.cpp')
-rw-r--r-- | src/gui/painting/qcosmeticstroker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp index c67d5ab1ce..001c44696a 100644 --- a/src/gui/painting/qcosmeticstroker.cpp +++ b/src/gui/painting/qcosmeticstroker.cpp @@ -474,7 +474,7 @@ void QCosmeticStroker::calculateLastPoint(qreal rx1, qreal ry1, qreal rx2, qreal qSwap(y1, y2); } int yinc = F16Dot16FixedDiv(y2 - y1, x2 - x1); - int y = y1 << 10; + int y = y1 * (1 << 10); int x = (x1 + 32) >> 6; int xs = (x2 + 32) >> 6; |