CRITICAL
Rule Definition
Buffer overflows are one of the oldest but also the most common type of vulnerability affecting software that allows direct memory access. These vulnerabilities are because programmers make erroneous assumptions upon the size of the data that they write in their programs’
Remediation
Check if the ON SIZE ERROR is used when using these statments inside a loop.
Violation Code Sample
PERFORM UNTIL A > 100
ADD 1 TO A
END-PERFORM.
Fixed Code Sample
PERFORM UNTIL A > 100
ADD 1 TO A
ON SIZE ERROR
END-PERFORM.
Reference
https://cwe.mitre.org/data/definitions/787.html
https://www.owasp.org/index.php/A5_2004_Buffer_Overflow
Related Technologies
Technical Criterion
CWE-787 - Out-of-bounds Write
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.