aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-kbdc
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-12-09 13:55:54 +0100
committerMattias Andrée <maandree@operamail.com>2014-12-09 13:55:54 +0100
commit91db7358484f885eefe822d42cfe15101b2b417c (patch)
tree509548bdbb6d5e0e4541204e40c46cc50dc76440 /src/mds-kbdc
parentmds-kbdc: m + compile-layout: bug fixes and test cases (diff)
downloadmds-91db7358484f885eefe822d42cfe15101b2b417c.tar.gz
mds-91db7358484f885eefe822d42cfe15101b2b417c.tar.bz2
mds-91db7358484f885eefe822d42cfe15101b2b417c.tar.xz
mds-kbdc: compile-layout: watch out for incomplete function calls
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/mds-kbdc/compile-layout.c6
1 files changed, 6 insertions, 0 deletions
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);
}