Skip to content

Commit c15c61d

Browse files
committed
Warn about usage of posix function mktemp (#3918).
1 parent a6b719e commit c15c61d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

cfg/posix.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,8 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
528528
<not-null/>
529529
<not-uninit/>
530530
</arg>
531+
<warn severity="warning">Obsolete function 'mktemp' called. It is recommended to use 'mkstemp' or 'mkdtemp' instead.
532+
The function 'mktemp' is considered to be dangerous due to race conditions and some implementations generating only up to 26 different filenames out of each template. This function has been removed in POSIX.1-2008. Use 'mkstemp' or 'mkdtemp' instead.</warn>
531533
</function>
532534
<!-- char *getcwd(char *buf, size_t size); -->
533535
<function name="getcwd">

0 commit comments

Comments
 (0)