Skip to content

Commit 781fea8

Browse files
committed
Region cannot handle malformed Rects. Abort the Region op in that case.
Bug: 5331198, 5334829 Change-Id: I05f2aaa95c55fe9e4a5d23180bb3032896c88151
1 parent 04ba6d0 commit 781fea8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libs/ui/Region.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ void Region::boolean_operation(int op, Region& dst,
482482
if (!rhs.isValid()) {
483483
LOGE("Region::boolean_operation(op=%d) invalid Rect={%d,%d,%d,%d}",
484484
op, rhs.left, rhs.top, rhs.right, rhs.bottom);
485+
return;
485486
}
486487

487488
#if VALIDATE_WITH_CORECG || VALIDATE_REGIONS

0 commit comments

Comments
 (0)