Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: src/pathops/SkOpAngle.cpp

Issue 1503423003: ubsan shift fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add cast to work around win compiler Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/images/SkImageDecoder_libico.cpp ('k') | src/ports/SkFontMgr_android_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpAngle.cpp
diff --git a/src/pathops/SkOpAngle.cpp b/src/pathops/SkOpAngle.cpp
index 655df45b15fa16edf91881f39741be605937cc62..c2eb0c93266212360fb5f2550ffd7e13ee0880cc 100644
--- a/src/pathops/SkOpAngle.cpp
+++ b/src/pathops/SkOpAngle.cpp
@@ -1016,7 +1016,7 @@ deferTilLater:
if (!crossesZero) {
fSectorMask = (unsigned) -1 >> (31 - end + start) << start;
} else {
- fSectorMask = (unsigned) -1 >> (31 - start) | (-1 << end);
+ fSectorMask = (unsigned) -1 >> (31 - start) | ((unsigned) -1 << end);
}
}
« no previous file with comments | « src/images/SkImageDecoder_libico.cpp ('k') | src/ports/SkFontMgr_android_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698