...
Functions in the first column of the following table are hereby defined to be obsolescent functions. To remediate invocations of obsolescent functions, an application might use inline coding that, in all respects, conforms to this guideline, or an alternative library that, in all respects, conforms to this guideline, or alternative non-obsolescent functions.
Obsolescent | Recommended | Rationale |
---|---|---|
|
| Non-reentrant |
|
| No error detection |
|
| No error detection |
|
| No error detection |
|
| No error detection |
|
| Non-reentrant |
|
| No exclusive access to file |
|
| No exclusive access to file |
|
| No error detection |
|
| No error detection |
...
The asctime
and ctime
functions are obsolescent because they use non-reentrant static buffers and can be emulated using asctime_s
and ctime_s
.
Unchecked Obsolescent Functions
...
To remediate invocations of unchecked obsolescent functions, an application might use inline coding that, in all respects, conforms to this guideline, or an alternative library that, in all respects, conforms to this guideline, or alternative nonobsolescent functions from C11, Annex K:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
...
[Apple 2006] | Apple Secure Coding Guide, "Avoiding Race Conditions and Insecure File Operations" | ||
[Burch 2006] | Specifications for Managed Strings, Second Edition | ||
[Drepper 2006] | Section 2.2.1 "Identification When Opening" | ||
[IEEE Std 1003.1:2013] | XSH, System Interfaces, open | ISO/IEC 9945:2003 | |
ISO/IEC 23360-1:2006 | |||
[ISO/IEC WG14 N1173] | Rationale for TR 24731 Extensions to the C Library Part I: Bounds-checking interfaces | ||
[Klein 2002] | "Bullet Proof Integer Input Using strtol() " | ||
[Linux 2008] | strtok(3) | [Open Group 2004] | "The open Function" |
[Seacord 2013] | Chapter 2, "Strings" Chapter 8, "File I/O" | ||
[Seacord 2005b] | "Managed String Library for C, C/C++" |
...