bug 586501 - [harfbuzz] check 'rows' value is valid during GPOS sanitize. r=jdaggett a=blocking2.0

This commit is contained in:
Jonathan Kew 2010-08-17 15:49:40 +01:00
Родитель dbbd6a3d3d
Коммит 6d3b63fe44
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -343,7 +343,7 @@ struct AnchorMatrix
inline bool sanitize (hb_sanitize_context_t *c, unsigned int cols) {
TRACE_SANITIZE ();
if (!c->check_struct (this)) return false;
if (unlikely (cols >= ((unsigned int) -1) / rows)) return false;
if (unlikely (rows > 0 && cols >= ((unsigned int) -1) / rows)) return false;
unsigned int count = rows * cols;
if (!c->check_array (matrix, matrix[0].static_size, count)) return false;
for (unsigned int i = 0; i < count; i++)