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:
9fc8684
)
Check for (impossible) overflow
author
Behdad Esfahbod
<behdad@behdad.org>
Thu, 22 Apr 2010 17:50:22 +0000
(13:50 -0400)
committer
Behdad Esfahbod
<behdad@behdad.org>
Thu, 22 Apr 2010 17:50:22 +0000
(13:50 -0400)
src/hb-ot-layout-gpos-private.hh
patch
|
blob
|
history
diff --git
a/src/hb-ot-layout-gpos-private.hh
b/src/hb-ot-layout-gpos-private.hh
index
494f599
..
895bdca
100644
(file)
--- a/
src/hb-ot-layout-gpos-private.hh
+++ b/
src/hb-ot-layout-gpos-private.hh
@@
-322,6
+322,7
@@
struct AnchorMatrix
inline bool sanitize (SANITIZE_ARG_DEF, unsigned int cols) {
TRACE_SANITIZE ();
if (!SANITIZE_SELF ()) return false;
+ if (HB_UNLIKELY (cols >= ((unsigned int) -1) / rows)) return false;
unsigned int count = rows * cols;
if (!SANITIZE_ARRAY (matrix, matrix[0].get_size (), count)) return false;
for (unsigned int i = 0; i < count; i++)