...
Assigning the result of strtol()
to denom
without checking to make sure it fits, violates INT31-C. Ensure that integer conversions do not result in lost or misinterpreted data. See INT06-C. Use strtol() or a related function to convert a string token to an integer for a proper example of how to convert a string token to an integer and ensure that the value is in the range of int
.
...