{"push_id":2902108449,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"7b4403034e9fa52aff2ac1bc21cb3a63990cd40b","before":"ef53f00b22ed8b7f5d2f80ef82df6ab1cbd91817","commits":[{"sha":"7b4403034e9fa52aff2ac1bc21cb3a63990cd40b","author":{"name":"Federico Mena Quintero","email":"4999915a961edfd7686112c2935288e1266eae14@gnome.org"},"message":"(#344): Don't let a viewBox with overflowing numbers pass through\n\nThis commit adds expect_finite_number() and finite_f32() to parsers.rs.\n\nPart of issue #344 is that we need to validate parsed numbers, as\ncssparser can give us back -inf or inf when it overflows.  These\nvalues ripple down the code and end up creating a NaN inside a\ncairo::Matrix, which makes it invalid.\n\nThis commit introduces a CssParserExt trait to have an\nexpect_finite_number() method for cssparser::Parser, and the\ncorresponding, low-level finite_f32() validation function.\n\nThose functions return a Result<f32, ValueErrorKind>.  This commit\nmakes the following return a ValueErrorKind for the error case as\nwell:\n\n* impl Parse for f64\n* parsers::number()\n* parsers::number_optional_number()\n* parsers:;integer()\n* parsers::integer_optional_integer()\n\nThis has implications in all the callers, since they used to expect a\nParseError, but must now expect ValueErrorKind.\n\nThe biggest change is in transform.rs.  For simplicity, the individual\nparsers for transform functions now have two sections:  the first\nextracts f32 from cssparser::Parser, and the second validates those\nnumbers and computes the final result --- instead of doing everything\nat the same time.\n\nhttps://gitlab.gnome.org/GNOME/librsvg/issues/344","distinct":true,"url":"https://api.github.com/repos/GNOME/librsvg/commits/7b4403034e9fa52aff2ac1bc21cb3a63990cd40b"}]}
{"actor":{"display_login":"gnomesysadmins"}}