Versions Compared

Key

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

...

This rule appears in the C Secure Coding Standard as MSC30-C. Do not use the rand() function for generating pseudorandom numbers.

This rule appears in the Java Secure Coding Standard as MSC30-J. Generate truly random numbers.

References

Wiki Markup
\[[ISO/IEC 9899:1999|AA. C++ References#ISO/IEC 9899-1999]\] Section 7.20.2.1, "The rand function"
\[[MITRE 07|AA. C++ References#MITRE 07]\] [CWE ID 330|http://cwe.mitre.org/data/definitions/330.html], "Use of Insufficiently Random Values"
\[[MSDN|AA. C++ References#MSDN]\] "[CryptGenRandom Function|http://msdn.microsoft.com/en-us/library/aa379942.aspx]"

...