mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 08:21:32 +01:00
[sanitize] Minor tweak to len=0 case which is handled otherwise anyway
This commit is contained in:
1 parent
403bc7caa4
commit
c24ea1036b
1 file changed
+2
-2
+2
-2
@@ -269,7 +269,7 @@ struct hb_sanitize_context_t :
|
||||
{
|
||||
const char *p = (const char *) base;
|
||||
bool ok = !len ||
|
||||
((uintptr_t) (p - this->start) < this->length &&
|
||||
((uintptr_t) (p - this->start) <= this->length &&
|
||||
(unsigned int) (this->end - p) >= len &&
|
||||
((this->max_ops -= len) > 0));
|
||||
|
||||
@@ -289,7 +289,7 @@ struct hb_sanitize_context_t :
|
||||
unsigned int len) const
|
||||
{
|
||||
const char *p = (const char *) base;
|
||||
bool ok = ((uintptr_t) (p - this->start) < this->length &&
|
||||
bool ok = ((uintptr_t) (p - this->start) <= this->length &&
|
||||
(unsigned int) (this->end - p) >= len);
|
||||
|
||||
DEBUG_MSG_LEVEL (SANITIZE, p, this->debug_depth+1, 0,
|
||||
|
||||
Reference in new issue
Block a user