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

Side by Side Diff: third_party/harfbuzz/src/harfbuzz-tibetan.c

Issue 10024052: [Harfbuzz] Fix OOB read in tibetan_form() (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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 unified diff | Download patch
« no previous file with comments | « third_party/harfbuzz/chromium.patch ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 2 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
3 * 3 *
4 * This is part of HarfBuzz, an OpenType Layout engine library. 4 * This is part of HarfBuzz, an OpenType Layout engine library.
5 * 5 *
6 * Permission is hereby granted, without written agreement and without 6 * Permission is hereby granted, without written agreement and without
7 * license or royalty fees, to use, copy, modify, and distribute this 7 * license or royalty fees, to use, copy, modify, and distribute this
8 * software and its documentation for any purpose, provided that the 8 * software and its documentation for any purpose, provided that the
9 * above copyright notice and the following two paragraphs appear in 9 * above copyright notice and the following two paragraphs appear in
10 * all copies of this software. 10 * all copies of this software.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConson ant, TibetanSubjoinedConsonant, 83 TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConson ant, TibetanSubjoinedConsonant,
84 84
85 TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConson ant, TibetanSubjoinedConsonant, 85 TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConson ant, TibetanSubjoinedConsonant,
86 TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConson ant, TibetanSubjoinedConsonant, 86 TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConson ant, TibetanSubjoinedConsonant,
87 TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConson ant, TibetanSubjoinedConsonant, 87 TibetanSubjoinedConsonant, TibetanSubjoinedConsonant, TibetanSubjoinedConson ant, TibetanSubjoinedConsonant,
88 TibetanSubjoinedConsonant, TibetanOther, TibetanOther, TibetanOther 88 TibetanSubjoinedConsonant, TibetanOther, TibetanOther, TibetanOther
89 }; 89 };
90 90
91 91
92 #define tibetan_form(c) \ 92 #define tibetan_form(c) \
93 ((c) >= 0x0f40 && (c) <= 0x0fc0 ? (TibetanForm)tibetanForm[(c) - 0x0f40] : T ibetanOther) 93 ((c) >= 0x0f40 && (c) < 0x0fc0 ? (TibetanForm)tibetanForm[(c) - 0x0f40] : Ti betanOther)
94 94
95 static const HB_OpenTypeFeature tibetan_features[] = { 95 static const HB_OpenTypeFeature tibetan_features[] = {
96 { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty }, 96 { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty },
97 { HB_MAKE_TAG('a', 'b', 'v', 's'), AboveSubstProperty }, 97 { HB_MAKE_TAG('a', 'b', 'v', 's'), AboveSubstProperty },
98 { HB_MAKE_TAG('b', 'l', 'w', 's'), BelowSubstProperty }, 98 { HB_MAKE_TAG('b', 'l', 'w', 's'), BelowSubstProperty },
99 { HB_MAKE_TAG('c', 'a', 'l', 't'), CaltProperty }, 99 { HB_MAKE_TAG('c', 'a', 'l', 't'), CaltProperty },
100 {0, 0} 100 {0, 0}
101 }; 101 };
102 102
103 static HB_Bool tibetan_shape_syllable(HB_Bool openType, HB_ShaperItem *item, HB_ Bool invalid) 103 static HB_Bool tibetan_shape_syllable(HB_Bool openType, HB_ShaperItem *item, HB_ Bool invalid)
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 while (i < boundary) { 265 while (i < boundary) {
266 attributes[i].charStop = FALSE; 266 attributes[i].charStop = FALSE;
267 ++uc; 267 ++uc;
268 ++i; 268 ++i;
269 } 269 }
270 assert(i == boundary); 270 assert(i == boundary);
271 } 271 }
272 } 272 }
273 273
274 274
OLDNEW
« no previous file with comments | « third_party/harfbuzz/chromium.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698