mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.4863: accessing freed memory in test without the +channel feature
Problem: Accessing freed memory in test without the +channel feature. (Dominique Pellé) Solution: Do not generted PUSHCHANNEL or PUSHJOB if they are not implemented. (closes #10350)
This commit is contained in:
@@ -755,12 +755,19 @@ generate_PUSHS(cctx_T *cctx, char_u **str)
|
||||
int
|
||||
generate_PUSHCHANNEL(cctx_T *cctx)
|
||||
{
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
isn_T *isn;
|
||||
#endif
|
||||
|
||||
RETURN_OK_IF_SKIP(cctx);
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
if ((isn = generate_instr_type(cctx, ISN_PUSHCHANNEL, &t_channel)) == NULL)
|
||||
return FAIL;
|
||||
return OK;
|
||||
#else
|
||||
emsg(_(e_channel_job_feature_not_available));
|
||||
return FAIL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -769,12 +776,19 @@ generate_PUSHCHANNEL(cctx_T *cctx)
|
||||
int
|
||||
generate_PUSHJOB(cctx_T *cctx)
|
||||
{
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
isn_T *isn;
|
||||
#endif
|
||||
|
||||
RETURN_OK_IF_SKIP(cctx);
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
if ((isn = generate_instr_type(cctx, ISN_PUSHJOB, &t_job)) == NULL)
|
||||
return FAIL;
|
||||
return OK;
|
||||
#else
|
||||
emsg(_(e_channel_job_feature_not_available));
|
||||
return FAIL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user