Skip to content

Commit

Permalink
updated for version 7.3.115
Browse files Browse the repository at this point in the history
Problem:    Vim can crash when tmpnam() returns NULL.
Solution:   Check for NULL. (Hong Xu)
  • Loading branch information
brammool committed Feb 9, 2011
1 parent ef378e5 commit 3cbb489
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/fileio.c
Expand Up @@ -7483,8 +7483,11 @@ vim_tempname(extra_char)
# else /* WIN3264 */

# ifdef USE_TMPNAM
char_u *p;

/* tmpnam() will make its own name */
if (*tmpnam((char *)itmp) == NUL)
p = tmpnam((char *)itmp);
if (p == NULL || *p == NUL)
return NULL;
# else
char_u *p;
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -714,6 +714,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
115,
/**/
114,
/**/
Expand Down

0 comments on commit 3cbb489

Please sign in to comment.