Fix a crash with invalid matrix element
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/140
This commit is contained in:
parent
b047e29954
commit
699d6e4d84
|
@ -1480,6 +1480,11 @@ FcParseMatrix (FcConfigParse *parse)
|
|||
m.xy = FcPopExpr (parse);
|
||||
m.xx = FcPopExpr (parse);
|
||||
|
||||
if (!m.yy || !m.yx || !m.xy || !m.xx)
|
||||
{
|
||||
FcConfigMessage (parse, FcSevereWarning, "Missing values in matrix element");
|
||||
return;
|
||||
}
|
||||
if (FcPopExpr (parse))
|
||||
FcConfigMessage (parse, FcSevereError, "wrong number of matrix elements");
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue