...
| Code Block |
|---|
signed long sl1, sl2, result;
if (sl2 == 0) {
/* handle error condition */
}
result = sl1 % sl2;
|
...
Priority: P4 Level: L2
Divide-by-zero errors can lead to abnormal program termination and denial-of-service attacks.
Component | Value |
|---|---|
Severity | 1 (low) |
Likelihood | 2 (probable) |
Remediation cost | 2 (medium) |
References
- ISO/IEC 9899-1999 6.5.5 Multiplicative operators
- Seacord 05 Chapter 5 Integers
- Warren 02 Chapter 2 Basics