Skip to content

Commit

Permalink
use-after-free
Browse files Browse the repository at this point in the history
  • Loading branch information
jamessan committed Nov 17, 2017
1 parent b419c07 commit 1d2c1a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/os_unix.c
Expand Up @@ -352,15 +352,15 @@ static struct signalinfo
int
mch_chdir(char *path)
{
char *leak = malloc(1);
strcpy(leak, "foo");
if (p_verbose >= 5)
{
verbose_enter();
smsg((char_u *)"chdir(%s)", path);
verbose_leave();
}
smsg((char_u *)"overrun %s", leak);
char *leak = strdup("foo");
free(leak);
smsg((char_u *)"leak %s", leak);
# ifdef VMS
return chdir(vms_fixfilename(path));
# else
Expand Down

0 comments on commit 1d2c1a3

Please sign in to comment.