...
Misuse of the fsetpos() function can position a file position indicator to an unintended location in the file.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
|---|---|---|---|---|---|
FIO44-C | Medium | Unlikely | Medium | P4 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| CodeSonar |
| (customization) | Users can add a custom check for violations of this constraint. | ||||||
| Compass/ROSE |
Can detect common violations of this rule. However, it cannot handle cases in which the value returned by | |||||||||
| LDRA tool suite |
| 82 D | Fully implemented | ||||||
| Polyspace Bug Finder | R2017b | Invalid file position | fsetpos() is invoked with a file position argument not obtained from fgetpos() |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...
Key here (explains table format and definitions)
Taxonomy | Taxonomy item | Relationship |
|---|---|---|
| ISO/IEC TS 17961:2013 | Using a value for fsetpos other than a value returned from fgetpos [xfilepos] | Prior to 2018-01-12: CERT: Unspecified Relationship |
Bibliography
| [ISO/IEC 9899:2011] | 7.21.9.3, "The fsetpos Function" |
...
...