bug 643015 - allow zero-length entry in CFF indexes. r=jdaggett
authorJonathan Kew <jfkthame@gmail.com>
Thu, 24 Mar 2011 20:11:38 +0000
changeset 63899 8887ebd9a6c86542499b8952bba1287f60d5d281
parent 63898 d48ac7574e445ca28e9a2e8b2bd78bf6ec8c3dd8
child 63900 60bfc795e935d8cc06025251e51f6af82907adcd
push id19279
push usereakhgari@mozilla.com
push dateFri, 25 Mar 2011 18:21:54 +0000
treeherdermozilla-central@b1267148533d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdaggett
bugs643015
milestone2.2a1pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 643015 - allow zero-length entry in CFF indexes. r=jdaggett
gfx/ots/src/cff.cc
--- a/gfx/ots/src/cff.cc
+++ b/gfx/ots/src/cff.cc
@@ -99,17 +99,17 @@ bool ParseIndex(ots::Buffer *table, ots:
       return OTS_FAILURE();
     }
 
     index->offsets.push_back(
         object_data_offset + (rel_offset - 1));  // less than length(), 1GB.
   }
 
   for (unsigned i = 1; i < index->offsets.size(); ++i) {
-    if (index->offsets[i] <= index->offsets[i - 1]) {
+    if (index->offsets[i] < index->offsets[i - 1]) {
       return OTS_FAILURE();
     }
   }
 
   index->offset_to_next = index->offsets.back();
   return true;
 }