diff options
| author | 2018-04-10 02:50:56 +0000 | |
|---|---|---|
| committer | 2018-04-10 02:50:56 +0000 | |
| commit | ab2e344ec32bb3ec6bb58a72344fc2bc3bac68cf (patch) | |
| tree | a09140802e971bc489ed4ceeec8f88c16a34e220 /libs | |
| parent | 505dbf0fcc0d6a107c6af3a2cd1f21095f1455c6 (diff) | |
| parent | 2d023068fe99d992933225a6722f3ec5a280fc94 (diff) | |
Merge "Region: Speculative fix for ubsan abort" into pi-dev
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/ui/Region.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/ui/Region.cpp b/libs/ui/Region.cpp index 36da084c80..fe4ae6c414 100644 --- a/libs/ui/Region.cpp +++ b/libs/ui/Region.cpp @@ -838,6 +838,11 @@ Region::const_iterator Region::begin() const { } Region::const_iterator Region::end() const { + // Workaround for b/77643177 + // mStorage should never be empty, but somehow it is and it's causing + // an abort in ubsan + if (mStorage.isEmpty()) return mStorage.array(); + size_t numRects = isRect() ? 1 : mStorage.size() - 1; return mStorage.array() + numRects; } |