| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2007,2008,2009,2010 Red Hat, Inc. | 2 * Copyright © 2007,2008,2009,2010 Red Hat, Inc. |
| 3 * Copyright © 2010,2012 Google, Inc. | 3 * Copyright © 2010,2012 Google, Inc. |
| 4 * | 4 * |
| 5 * This is part of HarfBuzz, a text shaping library. | 5 * This is part of HarfBuzz, a text shaping library. |
| 6 * | 6 * |
| 7 * Permission is hereby granted, without written agreement and without | 7 * Permission is hereby granted, without written agreement and without |
| 8 * license or royalty fees, to use, copy, modify, and distribute this | 8 * license or royalty fees, to use, copy, modify, and distribute this |
| 9 * software and its documentation for any purpose, provided that the | 9 * software and its documentation for any purpose, provided that the |
| 10 * above copyright notice and the following two paragraphs appear in | 10 * above copyright notice and the following two paragraphs appear in |
| (...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 { | 964 { |
| 965 unsigned int bl = buffer->backtrack_len (); | 965 unsigned int bl = buffer->backtrack_len (); |
| 966 end = bl + match_length; | 966 end = bl + match_length; |
| 967 | 967 |
| 968 int delta = bl - buffer->idx; | 968 int delta = bl - buffer->idx; |
| 969 /* Convert positions to new indexing. */ | 969 /* Convert positions to new indexing. */ |
| 970 for (unsigned int j = 0; j < count; j++) | 970 for (unsigned int j = 0; j < count; j++) |
| 971 match_positions[j] += delta; | 971 match_positions[j] += delta; |
| 972 } | 972 } |
| 973 | 973 |
| 974 for (unsigned int i = 0; i < lookupCount; i++) | 974 for (unsigned int i = 0; i < lookupCount && !buffer->in_error; i++) |
| 975 { | 975 { |
| 976 unsigned int idx = lookupRecord[i].sequenceIndex; | 976 unsigned int idx = lookupRecord[i].sequenceIndex; |
| 977 if (idx >= count) | 977 if (idx >= count) |
| 978 continue; | 978 continue; |
| 979 | 979 |
| 980 /* Don't recurse to ourself at same position. | 980 /* Don't recurse to ourself at same position. |
| 981 * Note that this test is too naive, it doesn't catch longer loops. */ | 981 * Note that this test is too naive, it doesn't catch longer loops. */ |
| 982 if (idx == 0 && lookupRecord[i].lookupListIndex == c->lookup_index) | 982 if (idx == 0 && lookupRecord[i].lookupListIndex == c->lookup_index) |
| 983 continue; | 983 continue; |
| 984 | 984 |
| (...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2270 { | 2270 { |
| 2271 TRACE_SANITIZE (this); | 2271 TRACE_SANITIZE (this); |
| 2272 return_trace (version.sanitize (c) && | 2272 return_trace (version.sanitize (c) && |
| 2273 likely (version.major == 1) && | 2273 likely (version.major == 1) && |
| 2274 scriptList.sanitize (c, this) && | 2274 scriptList.sanitize (c, this) && |
| 2275 featureList.sanitize (c, this) && | 2275 featureList.sanitize (c, this) && |
| 2276 lookupList.sanitize (c, this)); | 2276 lookupList.sanitize (c, this)); |
| 2277 } | 2277 } |
| 2278 | 2278 |
| 2279 protected: | 2279 protected: |
| 2280 FixedVersion» version;» /* Version of the GSUB/GPOS table--initially set | 2280 FixedVersion<>version;» /* Version of the GSUB/GPOS table--initially set |
| 2281 * to 0x00010000u */ | 2281 * to 0x00010000u */ |
| 2282 OffsetTo<ScriptList> | 2282 OffsetTo<ScriptList> |
| 2283 scriptList; /* ScriptList table */ | 2283 scriptList; /* ScriptList table */ |
| 2284 OffsetTo<FeatureList> | 2284 OffsetTo<FeatureList> |
| 2285 featureList; /* FeatureList table */ | 2285 featureList; /* FeatureList table */ |
| 2286 OffsetTo<LookupList> | 2286 OffsetTo<LookupList> |
| 2287 lookupList; /* LookupList table */ | 2287 lookupList; /* LookupList table */ |
| 2288 public: | 2288 public: |
| 2289 DEFINE_SIZE_STATIC (10); | 2289 DEFINE_SIZE_STATIC (10); |
| 2290 }; | 2290 }; |
| 2291 | 2291 |
| 2292 | 2292 |
| 2293 } /* namespace OT */ | 2293 } /* namespace OT */ |
| 2294 | 2294 |
| 2295 | 2295 |
| 2296 #endif /* HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH */ | 2296 #endif /* HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH */ |
| OLD | NEW |