mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 23:11:04 +01:00
Check for (impossible) overflow
This commit is contained in:
1 parent
9fc8684fd8
commit
9ac7dc73bc
1 file changed
+1
@@ -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++)
|
||||
|
||||
Reference in new issue
Block a user