Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Ignoring the result returned by the read() methods is a violation of rule EXP00-J. Do not ignore values returned by methods. Security issues can arise even when return values are considered, because the default behavior of the read() methods lacks any guarantee that the entire buffer array will be filled. Therefore, when using read() to fill an array, the program must check the return value of read(), and handle the case where the array is only partially filled. In such cases, the program may try to fill the rest of the array, or work only with the subset of the array that was filled, or throw an exception.

...