Index: third_party/ots/src/cff.cc |
diff --git a/third_party/ots/src/cff.cc b/third_party/ots/src/cff.cc |
index f72cbecb73fc58d5a24375c812b6573f7bbee15b..23b6dadac273d41741d6d74d0be964df3afc6d69 100644 |
--- a/third_party/ots/src/cff.cc |
+++ b/third_party/ots/src/cff.cc |
@@ -375,11 +375,17 @@ bool ParsePrivateDictData( |
operands.pop_back(); |
switch (op) { |
- // array |
+ // hints |
case 6: // BlueValues |
case 7: // OtherBlues |
case 8: // FamilyBlues |
case 9: // FamilyOtherBlues |
+ if (operands.empty() || (operands.size() % 2) != 0) { |
+ return OTS_FAILURE(); |
+ } |
+ break; |
+ |
+ // array |
case (12U << 8) + 12: // StemSnapH (delta) |
case (12U << 8) + 13: // StemSnapV (delta) |
if (operands.empty()) { |