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

Unified Diff: third_party/ots/src/math.cc

Issue 2210893002: Roll OTS to 8d70cffebbfa (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months 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 | « third_party/ots/src/cmap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/ots/src/math.cc
diff --git a/third_party/ots/src/math.cc b/third_party/ots/src/math.cc
index 0688071d7c82113a4efc239b36c92df7a345d510..36417dc2967139bd7673e2f0437cbc064f8bea15 100644
--- a/third_party/ots/src/math.cc
+++ b/third_party/ots/src/math.cc
@@ -448,6 +448,11 @@ bool ParseMathGlyphConstructionSequence(const ots::Font *font,
uint16_t offset_coverage,
uint16_t glyph_count,
const unsigned sequence_end) {
+ // Zero glyph count, nothing to parse.
+ if (!glyph_count) {
+ return true;
+ }
+
// Check coverage table.
if (offset_coverage < sequence_end || offset_coverage >= length) {
return OTS_FAILURE();
« no previous file with comments | « third_party/ots/src/cmap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698