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

Unified Diff: src/ports/SkFontMgr_android_parser.h

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/pathops/SkOpAngle.cpp ('k') | src/utils/SkDashPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontMgr_android_parser.h
diff --git a/src/ports/SkFontMgr_android_parser.h b/src/ports/SkFontMgr_android_parser.h
index aca1573952d17f4237387847c8dc35d68fe8bf4b..b841bc6d189d342de8029fa005b4b793b46e8953 100644
--- a/src/ports/SkFontMgr_android_parser.h
+++ b/src/ports/SkFontMgr_android_parser.h
@@ -211,7 +211,7 @@ template <int N, typename T> static bool parse_fixed(const char* s, T* value) {
n = -n;
frac = -frac;
}
- *value = (n << N) + frac;
+ *value = SkLeftShift(n, N) + frac;
return true;
}
« no previous file with comments | « src/pathops/SkOpAngle.cpp ('k') | src/utils/SkDashPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698