Problem: [security]: use-after-free in ex_getln.c
Solution: free pointer p a bit later (John Marriott)
closes: #15712
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
// there, thus copy up to the NUL and add a NUL.
mch_memmove(ccline.cmdbuff, p, (size_t)ccline.cmdlen);
ccline.cmdbuff[ccline.cmdlen] = NUL;
- vim_free(p);
if (ccline.xpc != NULL
&& ccline.xpc->xp_pattern != NULL
ccline.xpc->xp_pattern = ccline.cmdbuff + i;
}
+ vim_free(p);
+
return OK;
}
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 739,
/**/
738,
/**/