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

Unified Diff: src/cmap.cc

Issue 10913058: [OTS] cmap ParseFormat4() should check the first segment (Closed) Base URL: http://ots.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmap.cc
===================================================================
--- src/cmap.cc (revision 94)
+++ src/cmap.cc (working copy)
@@ -212,7 +212,7 @@
// A format 4 CMAP subtable is complex. To be safe we simulate a lookup of
// each code-point defined in the table and make sure that they are all valid
// glyphs and that we don't access anything out-of-bounds.
- for (unsigned i = 1; i < segcount; ++i) {
+ for (unsigned i = 0; i < segcount; ++i) {
agl 2012/09/04 13:30:05 Was there a reason why we didn't check the 0-index
Yusuke Sato 2012/09/04 17:43:06 I guess this is just a careless mistake... Line 1
for (unsigned cp = ranges[i].start_range; cp <= ranges[i].end_range; ++cp) {
const uint16_t code_point = cp;
if (ranges[i].id_range_offset == 0) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698