• Skip to main content
  • assistive.skiplink.to.breadcrumbs
  • assistive.skiplink.to.header.menu
  • assistive.skiplink.to.action.menu
  • assistive.skiplink.to.quick.search

Account disable/deletion announcement

Log in
Confluence
  • Spaces
  • Hit enter to search
  • Help
    • Online Help
    • Keyboard Shortcuts
    • Feed Builder
    • What’s new
    • Available Gadgets
    • About Confluence
  • Log in

SEI CERT C++ Coding Standard
SEI CERT C++ Coding Standard
  • Pages
  • Boards

Space shortcuts

  • Dashboard
  • Secure Coding Home
  • Android
  • C
  • C++
  • Java
  • Perl

Page tree

Browse pages
    • Attachments (0)
    • Page History
    • Page Information
    • Resolved comments
    • View in Hierarchy
    • View Source
    • Export to PDF
    • Export to Word
  1. Pages
  2. SEI CERT C++ Coding Standard
  3. 2 Rules
  • Jira links

Rule 03. Integers (INT)

  • Created by Aaron Ballman, last modified by David Svoboda on Mar 15, 2022

  • Page:
    INT50-CPP. Do not cast to an out-of-range enumeration value

 

The following rules from the SEI CERT C Coding Standard also apply in C++:

  • Page:
    INT30-C. Ensure that unsigned integer operations do not wrap
  • Page:
    INT31-C. Ensure that integer conversions do not result in lost or misinterpreted data
  • Page:
    INT32-C. Ensure that operations on signed integers do not result in overflow
  • Page:
    INT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors
  • Page:
    INT34-C. Do not shift an expression by a negative number of bits or by greater than or equal to the number of bits that exist in the operand
  • Page:
    INT35-C. Use correct integer precisions
  • Page:
    INT36-C. Converting a pointer to integer or integer to pointer

Information for Editors
To have a new guideline automatically listed above be sure to label it int and rule.

Risk Assessment Summary

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

INT50-CPPMediumUnlikelyMedium

P4

L3

 


 

  • rule-list
  • rule
  • int
  • section
Overview
Content Tools
  • Powered by Atlassian Confluence 8.3.2
  • Printed by Atlassian Confluence 8.3.2
  • Report a bug
  • Atlassian News
Atlassian

Carnegie Mellon University
Software Engineering Institute
4500 Fifth Avenue
Pittsburgh, PA 15213-2612
412-268-5800

Contact Us
  • Office Locations|
  • Additional Sites Directory|
  • Legal|
  • Privacy Notice|
  • CMU Ethics Hotline|
  • www.sei.cmu.edu

©2020 Carnegie Mellon University

{"serverDuration": 90, "requestCorrelationId": "963be055cf835d44"}