vim-patch:8.2.0171: fix use of uninitialized buffer #11786
Problem: Coverity warning for using uninitialized buffer.
Solution: Check the skip flag.
9a5e5a3e33
This commit is contained in:
parent
01ff9db633
commit
0b49cb67f2
|
@ -22132,11 +22132,12 @@ ret_free:
|
|||
static char_u *
|
||||
trans_function_name(
|
||||
char_u **pp,
|
||||
int skip, // only find the end, don't evaluate
|
||||
bool skip, // only find the end, don't evaluate
|
||||
int flags,
|
||||
funcdict_T *fdp, // return: info about dictionary used
|
||||
partial_T **partial // return: partial of a FuncRef
|
||||
)
|
||||
FUNC_ATTR_NONNULL_ARG(1)
|
||||
{
|
||||
char_u *name = NULL;
|
||||
const char_u *start;
|
||||
|
@ -22323,7 +22324,7 @@ trans_function_name(
|
|||
}
|
||||
|
||||
name = xmalloc(len + lead + 1);
|
||||
if (lead > 0){
|
||||
if (!skip && lead > 0) {
|
||||
name[0] = K_SPECIAL;
|
||||
name[1] = KS_EXTRA;
|
||||
name[2] = (int)KE_SNR;
|
||||
|
|
Loading…
Reference in New Issue