Next: High Integrity CPP Rule 10.3  Up: 10 Expressions  Previous: High Integrity CPP Rule 10.1  Contents

High Integrity CPP Rule 10.2   Access to an array should be demonstrably within the bounds of the array.
(QA C++  4307)

Justification

This improves robustness and security. This applies to indices and also to C library functions that modify arrays, such as sprintf() and scanf(). Functions that do not provide a means of bounds checking, such as gets(), should not be used.

Exclusive with

Rule 8.4.9


HICPP VERSION 2.4  http://www.codingstandard.com   Copyright: © 2007 THE PROGRAMMING RESEARCH GROUP