The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.

Impact: DoS: Resource Consumption (CPU)DoS: Resource Consumption (Memory)DoS: Amplification
An infinite loop will cause unexpected consumption of resources, such as CPU cycles or memory. The software's operation may slow down, or cause a long time to respond.
c
// create socket to connect to server* servsock = socket( AF_INET, SOCK_STREAM, 0); memset( &servaddr, 0, sizeof(servaddr)); servaddr.sin_family = AF_INET; servaddr.sin_port = htons(port); servaddr.sin_addr.s_addr = inet_addr(hostaddr);
c
c
// read and process messages* ...}
cc
// initialize number of attempts counter* int count = 0; do { ```
c
// read and process messages* ...}
cjava
// get inventory count for book* int inventoryCount = inventory.getIventoryCount(bookISBN);
java
javajava
// validate rateSold variable* if (rateSold < 1) { ``` return isReorder; } ... }