Title: MSC30-C. Do not use the rand() function for generating pseudorandom numbers  
Author: Fred Long Dec 15, 2006
Last Changed by: Swasti Shrivastava Sep 30, 2024
Tiny Link: (useful for email) https://wiki.sei.cmu.edu/confluence/x/UNcxBQ
Export As: Word · PDF  
Incoming Links
SEI CERT C++ Coding Standard (1)
    Page: MSC50-CPP. Do not use std::rand() for generating pseudorandom numbers
SEI CERT Oracle Coding Standard for Java (1)
    Page: MSC02-J. Generate strong random numbers
SEI CERT C Coding Standard (1)
    Page: CON33-C. Avoid race conditions when using library functions
Hierarchy
Parent Page
    Page: Rule 48. Miscellaneous (MSC)
Outgoing Links
External Links (17)
    https://cwe.mitre.org/data/index.html
    https://www.mathworks.com/help/bugfinder/ref/certcrulemsc30…
    https://wiki.sei.cmu.edu/confluence/display/java/SEI+CERT+O…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    www.openbsd.org/cgi-bin/man.cgi?query=arc4random
    https://wiki.sei.cmu.edu/confluence/display/cplusplus/MSC50…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://cwe.mitre.org/data/index.html676.html
    https://cwe.mitre.org/data/definitions/338.html
    cwe.mitre.org/
    https://wiki.sei.cmu.edu/confluence/display/java/MSC02-J.+G…
    https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
    https://www.kb.cert.org/vulnotes/bymetric?searchview&query=…
    https://wiki.sei.cmu.edu/confluence/display/c/How+this+Codi…
    cwe.mitre.org/data/definitions/327.html
    https://docs.microsoft.com/en-us/windows/desktop/api/bcrypt…
SEI CERT C Coding Standard (32)     Page: RuleChecker_V
    Page: Clang_40_V
    Page: BB. Definitions
    Page: LDRA_V
    Page: Polyspace Bug Finder
    Page: PC-lint Plus_V
    Home page: SEI CERT C Coding Standard
    Page: PC-lint Plus
    Page: Coverity
    Page: Clang
    Page: Helix QAC_V
    Page: Rose
    Page: CodeSonar_V
    Page: Cppcheck Premium
    Page: Astrée
    Page: Axivion Bauhaus Suite_V
    Page: ECLAIR_V
    Page: Parasoft
    Page: RuleChecker
    Page: Klocwork
    Page: Astrée_V
    Page: Helix QAC
    Page: ECLAIR
    Page: Cppcheck Premium_V
    Page: LDRA
    Page: Axivion Bauhaus Suite
    Page: Polyspace Bug Finder_V
    Page: Parasoft_V
    Page: AA. Bibliography
    Page: CodeSonar
    Page: Klocwork_V
    Page: Coverity_V