Title: MSC30-C. Do not use the rand() function for generating pseudorandom numbers  
Author: Fred Long Dec 15, 2006
Last Changed by: Jill Britton Apr 20, 2023
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 (30)     Page: Astrée
    Page: RuleChecker_V
    Page: Clang_40_V
    Page: Axivion Bauhaus Suite_V
    Page: ECLAIR_V
    Page: Parasoft
    Page: RuleChecker
    Page: BB. Definitions
    Page: Klocwork
    Page: LDRA_V
    Page: Astrée_V
    Page: Helix QAC
    Page: ECLAIR
    Page: Polyspace Bug Finder
    Page: LDRA
    Page: PC-lint Plus_V
    Home page: SEI CERT C Coding Standard
    Page: Axivion Bauhaus Suite
    Page: Polyspace Bug Finder_V
    Page: Parasoft_V
    Page: PC-lint Plus
    Page: Coverity
    Page: AA. Bibliography
    Page: Clang
    Page: CodeSonar
    Page: Klocwork_V
    Page: Helix QAC_V
    Page: Rose
    Page: Coverity_V
    Page: CodeSonar_V