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>
This commit is contained in:
Robert Loehning 2020-07-08 20:42:57 +02:00
parent cd16858823
commit fd0c9fcacc

View File

@ -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;