From c0ce0471b979d6fe39a16c7aed4f183922219e2e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 4 May 2019 13:56:51 +0100 Subject: Media queries: Validate the query string parameters. Signed-off-by: Michael Drake --- src/parse/mq.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3