diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-03-26 13:15:42 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-03-26 13:15:42 +0100 |
commit | cf3f8bf4ddfbc0f5ce53f0c9270dc15567f4feea (patch) | |
tree | b29dad3b0af388f98a1c88146a05ec7a66c6beb7 /src/vim9compile.c | |
parent | 0e05de46226eb4e5ea580beefa71831f92d613d3 (diff) | |
download | vim-git-cf3f8bf4ddfbc0f5ce53f0c9270dc15567f4feea.tar.gz |
patch 8.2.0449: Vim9: crash if return type is invalidv8.2.0449
Problem: Vim9: crash if return type is invalid. (Yegappan Lakshmanan)
Solution: Always return some type, not NULL.
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r-- | src/vim9compile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c index a595580db..dd3109262 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -1375,19 +1375,19 @@ parse_type_member(char_u **arg, type_T *type, garray_T *type_list) emsg(_("E1007: No white space allowed before <")); else emsg(_("E1008: Missing <type>")); - return NULL; + return type; } *arg = skipwhite(*arg + 1); member_type = parse_type(arg, type_list); if (member_type == NULL) - return NULL; + return type; *arg = skipwhite(*arg); if (**arg != '>') { emsg(_("E1009: Missing > after type")); - return NULL; + return type; } ++*arg; |