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:
66e3740
)
Assert that blob length doesn't overflow address.
author
Behdad Esfahbod
<behdad@behdad.org>
Fri, 19 Dec 2014 02:09:41 +0000
(18:09 -0800)
committer
Behdad Esfahbod
<behdad@behdad.org>
Fri, 19 Dec 2014 02:09:41 +0000
(18:09 -0800)
This will crash now, if blob was created with wrong length.
Check for that coming next commit.
src/hb-open-type-private.hh
patch
|
blob
|
history
diff --git
a/src/hb-open-type-private.hh
b/src/hb-open-type-private.hh
index
5616f04
..
477d9e2
100644
(file)
--- a/
src/hb-open-type-private.hh
+++ b/
src/hb-open-type-private.hh
@@
-194,6
+194,7
@@
struct hb_sanitize_context_t
{
this->start = hb_blob_get_data (this->blob, NULL);
this->end = this->start + hb_blob_get_length (this->blob);
+ assert (this->start <= this->end); /* Must not overflow. */
this->edit_count = 0;
this->debug_depth = 0;