Invalid use of standard library routine
Wrong arguments to standard library function
Description
This defect occurs when you use invalid arguments with a function from the standard library. This defect picks up errors related to other functions not covered by float, integer, memory, or string standard library routines.
Risk
Invalid arguments to a standard library function result in undefined behavior.
Fix
The fix depends on the root cause of the
                                defect. For instance, the argument to a printf
                                function can be NULL because a pointer was
                                initialized with NULL and the initialization
                                value was not overwritten along a specific execution path.
See examples of fixes below.
If you do not want to fix the issue, add comments to your result or code to avoid another review. See:
- Address Results in Polyspace User Interface Through Bug Fixes or Justifications if you review results in the Polyspace user interface. 
- Address Results in Polyspace Access Through Bug Fixes or Justifications (Polyspace Access) if you review results in a web browser. 
- Annotate Code and Hide Known or Acceptable Results if you review results in an IDE. 
Examples
Result Information
| Group: Programming | 
| Language: C | C++ | 
| Default: On | 
| Command-Line Syntax: OTHER_STD_LIB | 
| Impact: High | 
Version History
Introduced in R2013b
See Also
Find defects (-checkers) | Invalid use of standard library integer routine | Invalid use of standard library floating point routine | Invalid use of standard library memory routine | Invalid use of standard library string routine
Topics
- Interpret Bug Finder Results in Polyspace Desktop User Interface
- Interpret Bug Finder Results in Polyspace Access Web Interface (Polyspace Access)
- Address Results in Polyspace User Interface Through Bug Fixes or Justifications
- Address Results in Polyspace Access Through Bug Fixes or Justifications (Polyspace Access)