Mercurial > vim
comparison src/fileio.c @ 2697:6cc8a093e4a9 v7.3.115
updated for version 7.3.115
Problem: Vim can crash when tmpnam() returns NULL.
Solution: Check for NULL. (Hong Xu)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 09 Feb 2011 16:44:51 +0100 |
parents | b0605f2f9786 |
children | cd3f52531f6c |
comparison
equal
deleted
inserted
replaced
2696:a041f68d0590 | 2697:6cc8a093e4a9 |
---|---|
7481 return retval; | 7481 return retval; |
7482 | 7482 |
7483 # else /* WIN3264 */ | 7483 # else /* WIN3264 */ |
7484 | 7484 |
7485 # ifdef USE_TMPNAM | 7485 # ifdef USE_TMPNAM |
7486 char_u *p; | |
7487 | |
7486 /* tmpnam() will make its own name */ | 7488 /* tmpnam() will make its own name */ |
7487 if (*tmpnam((char *)itmp) == NUL) | 7489 p = tmpnam((char *)itmp); |
7490 if (p == NULL || *p == NUL) | |
7488 return NULL; | 7491 return NULL; |
7489 # else | 7492 # else |
7490 char_u *p; | 7493 char_u *p; |
7491 | 7494 |
7492 # ifdef VMS_TEMPNAM | 7495 # ifdef VMS_TEMPNAM |