GitLab will be down for maintenance this Sunday 13th June, from approx 7-11am UTC. This is for a PostgreSQL migration. See the tracker issue for more informations.

Commit 699d6e4d authored by Akira TAGOH's avatar Akira TAGOH
Browse files

Fix a crash with invalid matrix element

Fixes fontconfig/fontconfig#140
parent b047e299
...@@ -1480,6 +1480,11 @@ FcParseMatrix (FcConfigParse *parse) ...@@ -1480,6 +1480,11 @@ FcParseMatrix (FcConfigParse *parse)
m.xy = FcPopExpr (parse); m.xy = FcPopExpr (parse);
m.xx = 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)) if (FcPopExpr (parse))
FcConfigMessage (parse, FcSevereError, "wrong number of matrix elements"); FcConfigMessage (parse, FcSevereError, "wrong number of matrix elements");
else else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment