summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2019-05-04 13:56:51 +0100
committerMichael Drake <michael.drake@codethink.co.uk>2019-05-04 13:56:51 +0100
commitc0ce0471b979d6fe39a16c7aed4f183922219e2e (patch)
tree41dccc569322349f81113f55b5fb4b18bbf748e0 /src
parentf6bc2001832f1941ea40d52ab1333f3ceb76348a (diff)
downloadlibcss-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.c4
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) {