Painting: Fix value check in isUnclipped()
left() == INT_MIN or top() == INT_MIN will still underflow in QRect's ctor, so the check must be more strict Change-Id: I12ab148934c8c90865ca9247bd8badeedd4a9f45 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit d865129d9ea9f15d27bd1cc05058c95c17e23ebf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
a8de63b9e2
commit
49a64fad52
@ -2991,7 +2991,7 @@ inline bool QRasterPaintEnginePrivate::isUnclipped(const QRectF &rect,
|
||||
int penWidth) const
|
||||
{
|
||||
const QRectF norm = rect.normalized();
|
||||
if (norm.left() < INT_MIN || norm.top() < INT_MIN
|
||||
if (norm.left() <= INT_MIN || norm.top() <= INT_MIN
|
||||
|| norm.right() > INT_MAX || norm.bottom() > INT_MAX
|
||||
|| norm.width() > INT_MAX || norm.height() > INT_MAX)
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user