...
Code Block | ||||
---|---|---|---|---|
| ||||
char *file_name;
/* Initialize file_name */
FILE *fp;
errno_t res = fopen_s(&fp, file_name, "wx");
if (res != 0) {
/* Handle error */
}
|
...
Related Guidelines
CERT C++ Secure Coding Standard | FIO03-CPP. Do not make assumptions about fopen() and file creation |
ISO/IEC TR 24731-1:2007 | Section 6.5.2.1, "The fopen_s Function" |
...