tmpfile
From Wikipedia, the free encyclopedia
C Standard Library headers |
The ISO C/POSIX function tmpfile allows C/C++ programmers to create a temporary file, a special type of computer file which ceases to exist once it has been closed.
Contents |
[edit] Security Issues
The tmpfile function is susceptible to a number of security vulnerabilities; the UNIX function mkstemp, which performs a similar function, is less vulnerable to attack.
[edit] Usage
[edit] Inclusion
- C
#include <stdio.h>
- C++
#include <cstdio>
[edit] Declaration
FILE* tmpfile(void);
[edit] Semantics
The function tmpfile reports a pointer to a valid file stream on success; on failure, it returns NULL.
[edit] See Also
[edit] References
- tmpfile by OpenGroup
- tmpfile by HMUG
- Temporary Files by GNU C Library
- Insecure Temporary File by Fortify Software