projects
/
apps
/
home
/
video-player.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0db4b8
)
Fix possible but improbable overflow in hb_array_t
author
Behdad Esfahbod
<behdad@behdad.org>
Thu, 28 Apr 2011 16:58:28 +0000
(12:58 -0400)
committer
Behdad Esfahbod
<behdad@behdad.org>
Thu, 28 Apr 2011 16:58:28 +0000
(12:58 -0400)
src/hb-private.hh
patch
|
blob
|
history
diff --git
a/src/hb-private.hh
b/src/hb-private.hh
index
ce09d18
..
ca37084
100644
(file)
--- a/
src/hb-private.hh
+++ b/
src/hb-private.hh
@@
-297,7
+297,7
@@
struct hb_static_array_t {
array = new_array;
}
} else {
- bool overflows =
new_allocated >= ((unsigned int) -1) / sizeof (Type
);
+ bool overflows =
(new_allocated < allocated) || (new_allocated >= ((unsigned int) -1) / sizeof (Type)
);
if (unlikely (overflows))
new_array = NULL;
else