diff options
author | 2014-11-21 11:38:53 -0800 | |
---|---|---|
committer | 2014-11-21 11:38:53 -0800 | |
commit | 09a22e9597e271c44dc7c2b71c72cf62a7de1e19 (patch) | |
tree | 04e988c03aa87cdf3695740d53a43f2a783f7a58 /include | |
parent | 04038eba9f4e09724031c69146699f9c6e15748e (diff) |
Watch out for SkFixed overflow in SkMipMap.cpp.
Tested with -fsanitize=signed-integer-overflow.
This new assert used to trigger in MipMap unit test.
Don't appear to be any GM diffs.
BUG=skia:
Review URL: https://codereview.chromium.org/729373004
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkTypes.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h index 0e9e230349..a38be84d8f 100644 --- a/include/core/SkTypes.h +++ b/include/core/SkTypes.h @@ -352,6 +352,7 @@ template <typename T> inline void SkTSwap(T& a, T& b) { } static inline int32_t SkAbs32(int32_t value) { + SkASSERT(value != SK_NaN32); // The most negative int32_t can't be negated. if (value < 0) { value = -value; } |