projects
/
platform
/
upstream
/
libHarfBuzzSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d47990
)
Fix more possible buffer overruns
author
Behdad Esfahbod
<behdad@behdad.org>
Thu, 19 Jan 2012 02:28:34 +0000
(21:28 -0500)
committer
Behdad Esfahbod
<behdad@behdad.org>
Thu, 19 Jan 2012 02:28:34 +0000
(21:28 -0500)
I have this function, but can't clean up it to my satisfaction.
src/hb-ot-layout-gsubgpos-private.hh
patch
|
blob
|
history
diff --git
a/src/hb-ot-layout-gsubgpos-private.hh
b/src/hb-ot-layout-gsubgpos-private.hh
index
f1d03dc
..
13386c2
100644
(file)
--- a/
src/hb-ot-layout-gsubgpos-private.hh
+++ b/
src/hb-ot-layout-gsubgpos-private.hh
@@
-317,12
+317,14
@@
static inline bool apply_lookup (hb_apply_context_t *c,
*/
for (unsigned int i = 0; i < count; /* NOP */)
{
+ if (unlikely (c->buffer->idx == end))
+ return true;
while (c->should_mark_skip_current_glyph ())
{
- if (unlikely (c->buffer->idx == end))
- return true;
/* No lookup applied for this index */
c->buffer->next_glyph ();
+ if (unlikely (c->buffer->idx == end))
+ return true;
}
if (lookupCount && i == lookupRecord->sequenceIndex)