mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 14:31:10 +01:00
Avoid overflow in TableDirectory sanitize
This commit is contained in:
1 parent
fb5904ec93
commit
079dc40112
1 file changed
+1
-1
@@ -111,7 +111,7 @@ typedef struct OffsetTable
|
||||
public:
|
||||
inline bool sanitize (SANITIZE_ARG_DEF, const void *base) {
|
||||
TRACE_SANITIZE ();
|
||||
if (!(SANITIZE_SELF () && SANITIZE_MEM (tableDir, tableDir[0].get_size () * numTables))) return false;
|
||||
if (!(SANITIZE_SELF () && SANITIZE_ARRAY (tableDir, TableDirectory::get_size (), numTables))) return false;
|
||||
unsigned int count = numTables;
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
if (!SANITIZE_BASE (tableDir[i], base))
|
||||
|
||||
Reference in new issue
Block a user