From 91db7358484f885eefe822d42cfe15101b2b417c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 9 Dec 2014 13:55:54 +0100 Subject: mds-kbdc: compile-layout: watch out for incomplete function calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-kbdc/compile-layout.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/mds-kbdc/compile-layout.c b/src/mds-kbdc/compile-layout.c index 1e537d5..1d05d83 100644 --- a/src/mds-kbdc/compile-layout.c +++ b/src/mds-kbdc/compile-layout.c @@ -445,6 +445,12 @@ static char32_t* parse_function_call(mds_kbdc_tree_t* restrict tree, const char* arguments_ptr++; break; } + else if (**end == '\0') + { + if (tree->processed != PROCESS_LEVEL) + NEW_ERROR(tree, ERROR, "incomplete function call"); + goto error; + } r = parse_function_argument(tree, *end, lineoff + (size_t)(*end - raw), end, arguments + arguments_ptr++); fail_if (r < 0); } -- cgit v1.2.3-70-g09d2