Bug 1391855 - OTS: Match signedness in GlatEntry loop. r=jfkthame
MozReview-Commit-ID: IzzWbNVEwh
--- a/gfx/ots/README.mozilla
+++ b/gfx/ots/README.mozilla
@@ -1,12 +1,12 @@
This is the Sanitiser for OpenType project, from http://code.google.com/p/ots/.
Our reference repository is https://github.com/khaledhosny/ots/.
-Current revision: 57ef618b11aa0409637af04988ccce7e6b92ed0f (5.2.0)
+Current revision: e2d4b5daba24e746a48d240e90d92fe09a20b681 (5.2.0)
Upstream files included: LICENSE, src/, include/, tests/*.cc
Additional files: README.mozilla, src/moz.build
Additional patch: ots-visibility.patch (bug 711079).
Additional patch: ots-lz4.patch
--- a/gfx/ots/src/glat.cc
+++ b/gfx/ots/src/glat.cc
@@ -69,17 +69,17 @@ bool OpenTypeGLAT_v1::GlatEntry::ParsePa
if (!table.ReadU8(&this->attNum)) {
return parent->Error("GlatEntry: Failed to read attNum");
}
if (!table.ReadU8(&this->num)) {
return parent->Error("GlatEntry: Failed to read num");
}
//this->attributes.resize(this->num);
- for (unsigned i = 0; i < this->num; ++i) {
+ for (int i = 0; i < this->num; ++i) {
this->attributes.emplace_back();
if (!table.ReadS16(&this->attributes[i])) {
return parent->Error("GlatEntry: Failed to read attribute %u", i);
}
}
return true;
}
@@ -151,17 +151,17 @@ bool OpenTypeGLAT_v2::GlatEntry::ParsePa
if (!table.ReadS16(&this->attNum)) {
return parent->Error("GlatEntry: Failed to read attNum");
}
if (!table.ReadS16(&this->num) || this->num < 0) {
return parent->Error("GlatEntry: Failed to read valid num");
}
//this->attributes.resize(this->num);
- for (unsigned i = 0; i < this->num; ++i) {
+ for (int i = 0; i < this->num; ++i) {
this->attributes.emplace_back();
if (!table.ReadS16(&this->attributes[i])) {
return parent->Error("GlatEntry: Failed to read attribute %u", i);
}
}
return true;
}