Synopsis: | Any calculation result shall not overflow the corresponding output parameter or return value data type. |
Language: | C |
Severity Level: | 2 |
Category: | Library |
Description: |
Justification When supplied some very large input argument, the returned value could overflow, shown as Inf or -Inf value. Example y = exp (a * b); /* WARNING: a * b could be too large */ alpha = sqrt(a / c); /* WRONG if arguments can be negative */ Justification The following mathematical functions have an "overflow" risk: "ldexp", "sinh", "cosh", "exp", and "pow". |