diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2019-05-04 13:56:51 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2019-05-04 13:56:51 +0100 |
commit | c0ce0471b979d6fe39a16c7aed4f183922219e2e (patch) | |
tree | 41dccc569322349f81113f55b5fb4b18bbf748e0 /src | |
parent | f6bc2001832f1941ea40d52ab1333f3ceb76348a (diff) | |
download | libcss-c0ce0471b979d6fe39a16c7aed4f183922219e2e.tar.gz |
Media queries: Validate the query string parameters.
Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/parse/mq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parse/mq.c b/src/parse/mq.c index 7c1286f..cb9345d 100644 --- a/src/parse/mq.c +++ b/src/parse/mq.c @@ -1098,6 +1098,10 @@ css_error css_parse_media_query(lwc_string **strings, }, }; + if (mq == NULL || len == 0) { + return CSS_BADPARM; + } + err = css__parser_create_for_media_query(NULL, CSS_CHARSET_DEFAULT, &parser); if (err != CSS_OK) { |